diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 15:06:28 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-29 12:21:49 +0000 |
commit | 203a84195162941f6f8283f5be61794b94334d09 (patch) | |
tree | 5ff9b2b44fff0f2a85b480d3957b9f4564194275 /extra | |
parent | beb6ad2dfb7d853d9ce168c5d1a1d0be97bfa324 (diff) | |
download | chrome-ec-203a84195162941f6f8283f5be61794b94334d09.tar.gz |
extra/lightbar/simulation.h: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I725be1b8c902f477705d1dc3663121c115716fdd
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730182
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r-- | extra/lightbar/simulation.h | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/extra/lightbar/simulation.h b/extra/lightbar/simulation.h index edbe5f340e..c9263c8e54 100644 --- a/extra/lightbar/simulation.h +++ b/extra/lightbar/simulation.h @@ -38,13 +38,12 @@ int fake_consolecmd_lightbar(int argc, char *argv[]); #define CONFIG_LIGHTBAR_POWER_RAILS #endif - /* Stuff that's too interleaved with the rest of the EC to just include */ /* Test an important condition at compile time, not run time */ -#define _BA1_(cond, line) \ - extern int __build_assertion_ ## line[1 - 2*!(cond)] \ - __attribute__ ((unused)) +#define _BA1_(cond, line) \ + extern int __build_assertion_##line[1 - 2 * !(cond)] \ + __attribute__((unused)) #define _BA0_(c, x) _BA1_(c, x) #define BUILD_ASSERT(cond) _BA0_(cond, __LINE__) @@ -61,14 +60,14 @@ void cprints(int zero, const char *fmt, ...); /* Task events */ #define TASK_EVENT_CUSTOM_BIT(x) BUILD_CHECK_INLINE(BIT(x), BIT(x) & 0x0fffffff) -#define TASK_EVENT_I2C_IDLE 0x10000000 -#define TASK_EVENT_WAKE 0x20000000 -#define TASK_EVENT_MUTEX 0x40000000 -#define TASK_EVENT_TIMER 0x80000000 +#define TASK_EVENT_I2C_IDLE 0x10000000 +#define TASK_EVENT_WAKE 0x20000000 +#define TASK_EVENT_MUTEX 0x40000000 +#define TASK_EVENT_TIMER 0x80000000 /* Time units in usecs */ -#define MSEC 1000 -#define SECOND 1000000 +#define MSEC 1000 +#define SECOND 1000000 #define TASK_ID_LIGHTBAR 0 #define CC_LIGHTBAR 0 @@ -103,15 +102,22 @@ int system_add_jump_tag(uint16_t tag, int version, int size, const void *data); uint8_t *system_get_jump_tag(uint16_t tag, int *version, int *size); /* Export unused static functions to avoid compiler warnings. */ -#define DECLARE_HOOK(X, fn, Y) \ - void fake_hook_##fn(void) { fn(); } +#define DECLARE_HOOK(X, fn, Y) \ + void fake_hook_##fn(void) \ + { \ + fn(); \ + } -#define DECLARE_HOST_COMMAND(X, fn, Y) \ +#define DECLARE_HOST_COMMAND(X, fn, Y) \ enum ec_status fake_hostcmd_##fn(struct host_cmd_handler_args *args) \ - { return fn(args); } + { \ + return fn(args); \ + } -#define DECLARE_CONSOLE_COMMAND(X, fn, Y...) \ +#define DECLARE_CONSOLE_COMMAND(X, fn, Y...) \ int fake_consolecmd_##X(int argc, char *argv[]) \ - { return fn(argc, argv); } + { \ + return fn(argc, argv); \ + } -#endif /* __EXTRA_SIMULATION_H */ +#endif /* __EXTRA_SIMULATION_H */ |