From 140c51cb231e695e08fca861a37ceeeed8b260d7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 16 Dec 2014 09:54:32 -0600 Subject: Unify sensor debug. ADX driver was using input debug; LM75 and QENCODE that their own custom debug. Now all use CONFIG_DEBUG_SENSOR, sndbg() --- nuttx/include/debug.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'nuttx/include') diff --git a/nuttx/include/debug.h b/nuttx/include/debug.h index 56a5b9e77..10ef6889e 100644 --- a/nuttx/include/debug.h +++ b/nuttx/include/debug.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/debug.h * - * Copyright (C) 2007-2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2011, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -248,6 +248,18 @@ # define illvdbg(x...) #endif +#ifdef CONFIG_DEBUG_SENSORS +# define sndbg(format, ...) dbg(format, ##__VA_ARGS__) +# define snlldbg(format, ...) lldbg(format, ##__VA_ARGS__) +# define snvdbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define snllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#else +# define sndbg(x...) +# define snlldbg(x...) +# define snvdbg(x...) +# define snllvdbg(x...) +#endif + #ifdef CONFIG_DEBUG_ANALOG # define adbg(format, ...) dbg(format, ##__VA_ARGS__) # define alldbg(format, ...) lldbg(format, ##__VA_ARGS__) @@ -441,6 +453,18 @@ # define illvdbg (void) #endif +#ifdef CONFIG_DEBUG_SENSORS +# define sndbg dbg +# define snlldbg lldbg +# define snvdbg vdbg +# define snllvdbg llvdbg +#else +# define sndbg (void) +# define snlldbg (void) +# define snvdbg (void) +# define snllvdbg (void) +#endif + #ifdef CONFIG_DEBUG_ANALOG # define adbg dbg # define alldbg lldbg -- cgit v1.2.3