summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 4f30a0f308..f971387e00 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -1744,7 +1744,14 @@ struct ec_params_flash_read {
struct ec_params_flash_write {
uint32_t offset;
uint32_t size;
- /* Followed by data to write */
+ /* Followed by data to write. This union allows accessing an
+ * underlying buffer as uint32s or uint8s for convenience. This does not
+ * increase the size of the struct.
+ */
+ union {
+ uint32_t words32[0];
+ uint8_t bytes[0];
+ } data;
} __ec_align4;
/* Erase flash */