include/console.h: Format with clang-format
BRANCH=none
TEST=none
@@ -54,10 +54,9 @@ struct hex_buffer_params {
uint16_t size;
};
-#define HEX_BUF(_buffer, _size) (&(const struct hex_buffer_params){ \
- .buffer = (_buffer), \
- .size = (_size) \
-})
+#define HEX_BUF(_buffer, _size) \
+ (&(const struct hex_buffer_params){ .buffer = (_buffer), \
+ .size = (_size) })
/*
* Define parameters to printing in binary: the value to print, and the number
@@ -69,10 +68,9 @@ struct binary_print_params {
uint8_t count;
};
-#define BINARY_VALUE(_value, _count) (&(const struct binary_print_params){ \
- .value = (_value), \
- .count = (_count) \
-})
+#define BINARY_VALUE(_value, _count) \
+ (&(const struct binary_print_params){ .value = (_value), \
+ .count = (_count) })
#define PRINTF_TIMESTAMP_NOW NULL
@@ -178,8 +176,8 @@ int cputs(enum console_channel channel, const char *outstr);
*
* @return non-zero if output was truncated.
*/
-__attribute__((__format__(__printf__, 2, 3)))
-int cprintf(enum console_channel channel, const char *format, ...);
+__attribute__((__format__(__printf__, 2, 3))) int
+cprintf(enum console_channel channel, const char *format, ...);
/**
* Print formatted output with timestamp. This is like:
@@ -190,8 +188,8 @@ int cprintf(enum console_channel channel, const char *format, ...);
*
* @return non-zero if output was truncated.
*/
-__attribute__((__format__(__printf__, 2, 3)))
-int cprints(enum console_channel channel, const char *format, ...);
+__attribute__((__format__(__printf__, 2, 3))) int
+cprints(enum console_channel channel, const char *format, ...);
/**
* Flush the console output for all channels.
@@ -237,17 +235,14 @@ void console_has_input(void);
/* We always provde help args, but we may discard them to save space. */
#if defined(CONFIG_CONSOLE_CMDHELP)
-#define _HELP_ARGS(A, H) \
- .argdesc = A, \
- .help = H,
+#define _HELP_ARGS(A, H) .argdesc = A, .help = H,
#else
#define _HELP_ARGS(A, H)
#endif
/* We may or may not have a .flags field */
#ifdef CONFIG_CONSOLE_COMMAND_FLAGS
-#define _FLAG_ARGS(F) \
- .flags = F,
+#define _FLAG_ARGS(F) .flags = F,
#else
#define _FLAG_ARGS(F)
#endif
@@ -260,11 +255,10 @@ void console_has_input(void);
"command name '" #NAME "' is too long"); \
const struct console_command __keep __no_sanitize_address \
__con_cmd_##NAME \
- __attribute__((section(".rodata.cmds." #NAME))) = \
- { .name = __con_cmd_label_##NAME, \
+ __attribute__((section(".rodata.cmds." #NAME))) = { \
+ .name = __con_cmd_label_##NAME, \
.handler = ROUTINE, \
- _HELP_ARGS(ARGDESC, HELP) \
- _FLAG_ARGS(FLAGS) \
+ _HELP_ARGS(ARGDESC, HELP) _FLAG_ARGS(FLAGS) \
}
/*
