mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
driver/capture : add capture debug, fixed compile warning
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
This commit is contained in:
committed by
Mateusz Szafoni
parent
d5407b16f8
commit
417207678e
@@ -1591,6 +1591,44 @@ config DEBUG_PWM_INFO
|
|||||||
|
|
||||||
endif # DEBUG_PWM
|
endif # DEBUG_PWM
|
||||||
|
|
||||||
|
config DEBUG_CAPTURE
|
||||||
|
bool "CAPTURE Debug Features"
|
||||||
|
default n
|
||||||
|
depends on CAPTURE
|
||||||
|
---help---
|
||||||
|
Enable CAPTURE debug features.
|
||||||
|
|
||||||
|
Support for this debug option is architecture-specific and may not
|
||||||
|
be available for some MCUs.
|
||||||
|
|
||||||
|
if DEBUG_CAPTURE
|
||||||
|
|
||||||
|
config DEBUG_CAPTURE_ERROR
|
||||||
|
bool "CAPTURE Error Output"
|
||||||
|
default n
|
||||||
|
depends on DEBUG_ERROR
|
||||||
|
---help---
|
||||||
|
Enable CAPTURE driver error output to SYSLOG.
|
||||||
|
|
||||||
|
Support for this debug option is architecture-specific and may not
|
||||||
|
be available for some MCUs.
|
||||||
|
|
||||||
|
config DEBUG_CAPTURE_WARN
|
||||||
|
bool "CAPTURE Warnings Output"
|
||||||
|
default n
|
||||||
|
depends on DEBUG_WARN
|
||||||
|
---help---
|
||||||
|
Enable CAPTURE driver warning output to SYSLOG.
|
||||||
|
|
||||||
|
config DEBUG_CAPTURE_INFO
|
||||||
|
bool "CAPTURE Informational Output"
|
||||||
|
default n
|
||||||
|
depends on DEBUG_INFO
|
||||||
|
---help---
|
||||||
|
Enable CAPTURE driver informational output to SYSLOG.
|
||||||
|
|
||||||
|
endif # DEBUG_CAPTURE
|
||||||
|
|
||||||
config DEBUG_RC
|
config DEBUG_RC
|
||||||
bool "RC Debug Features"
|
bool "RC Debug Features"
|
||||||
default n
|
default n
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ static int cap_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
FAR struct cap_lowerhalf_s *lower;
|
FAR struct cap_lowerhalf_s *lower;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
snprintf("cmd: %d arg: %ld\n", cmd, arg);
|
cpinfo("cmd: %d arg: %ld\n", cmd, arg);
|
||||||
upper = inode->i_private;
|
upper = inode->i_private;
|
||||||
DEBUGASSERT(upper != NULL);
|
DEBUGASSERT(upper != NULL);
|
||||||
lower = upper->lower;
|
lower = upper->lower;
|
||||||
@@ -310,7 +310,7 @@ static int cap_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
snprintf("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg);
|
cperr("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -611,6 +611,24 @@
|
|||||||
# define pwminfo _none
|
# define pwminfo _none
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_CAPTURE_ERROR
|
||||||
|
# define cperr _err
|
||||||
|
#else
|
||||||
|
# define cperr _none
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_CAPTURE_WARN
|
||||||
|
# define cpwarn _warn
|
||||||
|
#else
|
||||||
|
# define cpwarn _none
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_CAPTURE_INFO
|
||||||
|
# define cpinfo _info
|
||||||
|
#else
|
||||||
|
# define cpinfo _none
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_RC_ERROR
|
#ifdef CONFIG_DEBUG_RC_ERROR
|
||||||
# define rcerr _err
|
# define rcerr _err
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user