include/host_command.h: Format with clang-format
BRANCH=none
TEST=none
@@ -131,8 +131,7 @@ struct host_command {
#ifdef CONFIG_HOST_EVENT64
typedef uint64_t host_event_t;
#define HOST_EVENT_CPRINTS(str, e) CPRINTS("%s 0x%016" PRIx64, str, e)
-#define HOST_EVENT_CCPRINTF(str, e) \
- ccprintf("%s 0x%016" PRIx64 "\n", str, e)
+#define HOST_EVENT_CCPRINTF(str, e) ccprintf("%s 0x%016" PRIx64 "\n", str, e)
#else
typedef uint32_t host_event_t;
@@ -271,10 +270,11 @@ struct host_command *zephyr_find_host_command(int command);
*/
#define DECLARE_HOST_COMMAND(command, routine, version_mask) \
static enum ec_status(routine)(struct host_cmd_handler_args * args); \
- const struct host_command __keep __no_sanitize_address \
- EXPAND(0x0000, command) \
- __attribute__((section(".rodata.hcmds." EXPANDSTR(0x0000, command)))) \
- = {routine, command, version_mask}
+ const struct host_command __keep __no_sanitize_address EXPAND(0x0000, \
+ command) \
+ __attribute__((section(".rodata.hcmds." EXPANDSTR( \
+ 0x0000, command)))) = { routine, command, \
+ version_mask }
/*
* Register a private host command handler with
@@ -282,12 +282,13 @@ struct host_command *zephyr_find_host_command(int command);
*/
#define DECLARE_PRIVATE_HOST_COMMAND(command, routine, version_mask) \
static enum ec_status(routine)(struct host_cmd_handler_args * args); \
- const struct host_command __keep __no_sanitize_address \
- EXPAND(EC_CMD_BOARD_SPECIFIC_BASE, command) \
- __attribute__((section(".rodata.hcmds."\
- EXPANDSTR(EC_CMD_BOARD_SPECIFIC_BASE, command)))) \
- = {routine, EC_PRIVATE_HOST_COMMAND_VALUE(command), \
- version_mask}
+ const struct host_command __keep __no_sanitize_address EXPAND( \
+ EC_CMD_BOARD_SPECIFIC_BASE, command) \
+ __attribute__((section(".rodata.hcmds." EXPANDSTR( \
+ EC_CMD_BOARD_SPECIFIC_BASE, command)))) = { \
+ routine, EC_PRIVATE_HOST_COMMAND_VALUE(command), \
+ version_mask \
+ }
#else /* !CONFIG_ZEPHYR && !HAS_TASK_HOSTCMD */
#define DECLARE_HOST_COMMAND(command, routine, version_mask) \
static enum ec_status(routine)(struct host_cmd_handler_args * args) \
@@ -304,7 +305,6 @@ struct host_command *zephyr_find_host_command(int command);
*/
void host_throttle_cpu(int throttle);
-
/**
* Signal host command task to send status to PD MCU.
*
@@ -335,8 +335,7 @@ int pd_get_active_charge_port(void);
* @param indata Pointer to buffer to store response
* @param insize Size of buffer to store response
*/
-int pd_host_command(int command, int version,
- const void *outdata, int outsize,
+int pd_host_command(int command, int version, const void *outdata, int outsize,
void *indata, int insize);
/*
