mirror of
https://github.com/apache/nuttx.git
synced 2025-12-15 00:41:51 +08:00
Kconfig, include/debug.h, and drivers/contactless: Add debug macros for contactless. The various contactless device drivers currently define device specific debug macros within their local header files. This patch adds generic ctls[info|warn|err] macros for the overall contactless subsystem to be used in future drivers. Ported the two currently available contactless device drivers (mfrc522.c and pn532.c) to these generic logging macros and fixed some logging bugs
along the way.
This commit is contained in:
committed by
Gregory Nutt
parent
a383a86e72
commit
469859b9f1
@@ -287,6 +287,24 @@
|
||||
# define finfo(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CONTACTLESS_ERROR
|
||||
# define ctlserr(format, ...) _err(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define ctlserr(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CONTACTLESS_WARN
|
||||
# define ctlswarn(format, ...) _warn(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define ctlswarn(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CONTACTLESS_INFO
|
||||
# define ctlsinfo(format, ...) _info(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define ctlsinfo(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CRYPTO_ERROR
|
||||
# define crypterr(format, ...) _err(format, ##__VA_ARGS__)
|
||||
#else
|
||||
@@ -867,6 +885,24 @@
|
||||
# define finfo (void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CONTACTLESS_ERROR
|
||||
# define ctlserr _err
|
||||
#else
|
||||
# define ctlserr (void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CONTACTLESS_WARN
|
||||
# define ctlswarn _warn
|
||||
#else
|
||||
# define ctlswarn (void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CONTACTLESS_INFO
|
||||
# define ctlsinfo _info
|
||||
#else
|
||||
# define ctlsinfo (void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CRYPTO_ERROR
|
||||
# define crypterr _err
|
||||
#else
|
||||
@@ -1363,6 +1399,14 @@
|
||||
# define finfodumpbuffer(m,b,n)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_CONTACTLESS
|
||||
# define ctlserrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
||||
# define ctlinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
||||
#else
|
||||
# define ctlserrferrdumpbuffer(m,b,n)
|
||||
# define ctlinfodumpbuffer(m,b,n)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_INPUT
|
||||
# define ierrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
||||
# define iinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
||||
|
||||
Reference in New Issue
Block a user