summaryrefslogtreecommitdiff
path: root/include/event_log.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 15:11:08 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-01 21:07:35 +0000
commit31a5f8401465da2c5ebbb67ae0605695dddc8e94 (patch)
treebe86198d726ed6881710f93d9718961b52f2d557 /include/event_log.h
parent106afede0f003a27ee8391e904d33017a9c6422a (diff)
downloadchrome-ec-31a5f8401465da2c5ebbb67ae0605695dddc8e94.tar.gz
include/event_log.h: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: I62574a23408d9a492228414cf405b34523cf6c3a Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730264 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'include/event_log.h')
-rw-r--r--include/event_log.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/event_log.h b/include/event_log.h
index 45b10a3a2d..f7e7244a54 100644
--- a/include/event_log.h
+++ b/include/event_log.h
@@ -8,14 +8,14 @@
struct event_log_entry {
uint32_t timestamp; /* relative timestamp in milliseconds */
- uint8_t type; /* event type, caller-defined */
- uint8_t size; /* [7:5] caller-def'd [4:0] payload size in bytes */
- uint16_t data; /* type-defined data payload */
+ uint8_t type; /* event type, caller-defined */
+ uint8_t size; /* [7:5] caller-def'd [4:0] payload size in bytes */
+ uint16_t data; /* type-defined data payload */
uint8_t payload[0]; /* optional additional data payload: 0..16 bytes */
} __packed;
-#define EVENT_LOG_SIZE_MASK 0x1f
-#define EVENT_LOG_SIZE(size) ((size) & EVENT_LOG_SIZE_MASK)
+#define EVENT_LOG_SIZE_MASK 0x1f
+#define EVENT_LOG_SIZE(size) ((size)&EVENT_LOG_SIZE_MASK)
/* The timestamp is the microsecond counter shifted to get about a ms. */
#define EVENT_LOG_TIMESTAMP_SHIFT 10 /* 1 LSB = 1024us */
@@ -23,8 +23,8 @@ struct event_log_entry {
#define EVENT_LOG_NO_ENTRY 0xff
/* Add an entry to the event log. */
-void log_add_event(uint8_t type, uint8_t size, uint16_t data,
- void *payload, uint32_t timestamp);
+void log_add_event(uint8_t type, uint8_t size, uint16_t data, void *payload,
+ uint32_t timestamp);
/*
* Remove and return an entry from the event log, if available.