mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Change all variadic macros to C99 style
This commit is contained in:
@@ -130,7 +130,7 @@ index c78362f..207f9b9 100644
|
||||
|
||||
+#if 0
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define nsh_output(v, fmt...) (v)->output(v, ##fmt)
|
||||
# define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__)
|
||||
#else
|
||||
# define nsh_output vtbl->output
|
||||
#endif
|
||||
|
||||
@@ -65,8 +65,9 @@
|
||||
# define LCD_YRES 67
|
||||
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
#endif
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
#endif
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_RITDEBUG
|
||||
# define ritdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
|
||||
# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
|
||||
# define ritdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
|
||||
# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
|
||||
#else
|
||||
# define ritdbg(x...)
|
||||
# define oleddc_dumpgpio(m)
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_RITDEBUG
|
||||
# define ritdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
|
||||
# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
|
||||
# define ritdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
|
||||
# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
|
||||
#else
|
||||
# define ritdbg(x...)
|
||||
# define oleddc_dumpgpio(m)
|
||||
|
||||
@@ -85,9 +85,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define ugdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define oleddc_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_POWER, m)
|
||||
# define oledcs_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_CS, m)
|
||||
# define ugdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define oleddc_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_POWER, m)
|
||||
# define oledcs_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_CS, m)
|
||||
#else
|
||||
# define ugdbg(x...)
|
||||
# define oleddc_dumpgpio(m)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
#endif
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_NOKIADBG
|
||||
# define lcddbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcd_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LCD_RST, m)
|
||||
# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define lcd_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LCD_RST, m)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcd_dumpgpio(m)
|
||||
|
||||
@@ -159,14 +159,14 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LCD_REGDEBUG
|
||||
# define regdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define regdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define regdbg(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) dbg(format, ##arg)
|
||||
# define lcdvdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
|
||||
@@ -114,8 +114,8 @@
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) dbg(format, ##arg)
|
||||
# define lcdvdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
|
||||
@@ -144,8 +144,8 @@
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) dbg(format, ##arg)
|
||||
# define lcdvdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
#endif
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) dbg(format, ##arg)
|
||||
# define lcdvdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) dbg(format, ##arg)
|
||||
# define lcdvdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
|
||||
#define DEFAULT_BAUD 9600
|
||||
|
||||
#define dbg(format, arg...) if (debug > 0) printconsole(format, ##arg)
|
||||
#define vdbg(format, arg...) if (debug > 1) printconsole(format, ##arg)
|
||||
#define dbg(format, ...) if (debug > 0) printconsole(format, ##__VA_ARGS__)
|
||||
#define vdbg(format, ...) if (debug > 1) printconsole(format, ##__VA_ARGS__)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
|
||||
@@ -130,7 +130,7 @@ index c78362f..207f9b9 100644
|
||||
|
||||
+#if 0
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define nsh_output(v, fmt...) (v)->output(v, ##fmt)
|
||||
# define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__)
|
||||
#else
|
||||
# define nsh_output vtbl->output
|
||||
#endif
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, arg...) dbg(format, ##arg)
|
||||
# define lcdvdbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
|
||||
Reference in New Issue
Block a user