Make sure that CONFIG_USBDEV_TRACE_INITIALIDSET has an assigned value to avoid warnings

This commit is contained in:
Gregory Nutt 2015-09-08 07:24:26 -06:00
parent 6b1d61c759
commit a5d4ed2fef
4 changed files with 17 additions and 5 deletions

View File

@ -72,6 +72,10 @@
# endif
#endif
#ifndef CONFIG_USBDEV_TRACE_INITIALIDSET
# define CONFIG_USBDEV_TRACE_INITIALIDSET 0
#endif
#ifdef CONFIG_EXAMPLES_USBSERIAL_TRACEINIT
# define TRACE_INIT_BITS (TRACE_INIT_BIT)
#else
@ -223,7 +227,7 @@ int usbserial_main(int argc, char *argv[])
printf("usbserial_main: Successfully registered the serial driver\n");
#if CONFIG_USBDEV_TRACE && CONFIG_USBDEV_TRACE_INITIALIDSET != 0
#if defined(CONFIG_USBDEV_TRACE) && CONFIG_USBDEV_TRACE_INITIALIDSET != 0
/* If USB tracing is enabled and tracing of initial USB events is specified,
* then dump all collected trace data to stdout
*/

View File

@ -47,7 +47,7 @@
#include <semaphore.h>
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
@ -55,6 +55,10 @@
# define CONFIG_EXAMPLES_USBTERM_BUFLEN 256
#endif
#ifndef CONFIG_USBDEV_TRACE_INITIALIDSET
# define CONFIG_USBDEV_TRACE_INITIALIDSET 0
#endif
#ifdef CONFIG_EXAMPLES_USBTERM_TRACEINIT
# define TRACE_INIT_BITS (TRACE_INIT_BIT)
#else

View File

@ -1,7 +1,7 @@
/****************************************************************************
* examples/usbterm/usbterm_main.c
*
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -66,7 +66,7 @@
#include "usbterm.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
@ -226,7 +226,7 @@ int usbterm_main(int argc, char *argv[])
}
printf("usbterm_main: Successfully registered the serial driver\n");
#if CONFIG_USBDEV_TRACE && CONFIG_USBDEV_TRACE_INITIALIDSET != 0
#if defined(CONFIG_USBDEV_TRACE) && CONFIG_USBDEV_TRACE_INITIALIDSET != 0
/* If USB tracing is enabled and tracing of initial USB events is specified,
* then dump all collected trace data to stdout
*/

View File

@ -129,6 +129,10 @@
/* Trace initialization *****************************************************/
#ifndef CONFIG_USBDEV_TRACE_INITIALIDSET
# define CONFIG_USBDEV_TRACE_INITIALIDSET 0
#endif
#ifdef CONFIG_SYSTEM_COMPOSITE_TRACEINIT
# define TRACE_INIT_BITS (TRACE_INIT_BIT)
#else