apps/graphics/ft80x: Fix a few problems when debug output is enabled.

This commit is contained in:
Gregory Nutt 2018-02-21 06:56:29 -06:00
parent a2b232f832
commit 189996add6
3 changed files with 9 additions and 9 deletions

View File

@ -58,40 +58,40 @@
*/
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef GRAPHICS_FT80X_DEBUG_ERROR
# ifdef CONFIG_GRAPHICS_FT80X_DEBUG_ERROR
# define ft80x_err(format, ...) \
fprintf(stderr, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else
# define ft80x_err(format, ...)
# endif
# ifdef GRAPHICS_FT80X_DEBUG_WARN
# ifdef CONFIG_GRAPHICS_FT80X_DEBUG_WARN
# define ft80x_warn(format, ...) \
fprintf(stderr, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else
# define ft80x_warn(format, ...)
# endif
# ifdef GRAPHICS_FT80X_DEBUG_INFO
# ifdef CONFIG_GRAPHICS_FT80X_DEBUG_INFO
# define ft80x_info(format, ...) \
printf(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else
# define ft80x_info(format, ...)
# endif
#else
# ifdef GRAPHICS_FT80X_DEBUG_ERROR
# ifdef CONFIG_GRAPHICS_FT80X_DEBUG_ERROR
# define ft80x_err printf
# else
# define ft80x_err (void)
# endif
# ifdef GRAPHICS_FT80X_DEBUG_WARN
# ifdef CONFIG_GRAPHICS_FT80X_DEBUG_WARN
# define ft80x_warn printf
# else
# define ft80x_warn (void)
# endif
# ifdef GRAPHICS_FT80X_DEBUG_INFO
# ifdef CONFIG_GRAPHICS_FT80X_DEBUG_INFO
# define ft80x_info printf
# else
# define ft80x_info (void)

View File

@ -72,7 +72,7 @@
*
****************************************************************************/
#ifdef GRAPHICS_FT80X_DEBUG_INFO
#ifdef CONFIG_GRAPHICS_FT80X_DEBUG_INFO
static void ft80x_dl_dump(FAR struct ft80x_dlbuffer_s *buffer,
FAR const void *data, size_t len)
{

View File

@ -240,7 +240,7 @@ int ft80x_ramcmd_append(int fd, FAR struct ft80x_dlbuffer_s *buffer,
{
int errcode = errno;
ft80x_err("ERROR: ioctl() FT80X_IOC_PUTRAMCMD failed: %d\n",
errcode)
errcode);
return -errcode;
}
@ -358,7 +358,7 @@ int ft80x_ramcmd_waitfifoempty(int fd, FAR struct ft80x_dlbuffer_s *buffer)
if (ret < 0)
{
ret = -errno;
ft80x_err("ERROR: ioctl(FT80X_IOC_EVENTNOTIFY) failed: %d\n", errcode);
ft80x_err("ERROR: ioctl(FT80X_IOC_EVENTNOTIFY) failed: %d\n", ret);
break;
}