summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorDominic Chen <ddchen@chromium.org>2014-06-03 14:22:15 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-11 00:17:06 +0000
commitd414c89a61f1e74b1d49161c3d136ef55c3289de (patch)
treead06a9b2951272b676f236019ce4ccaece784286 /include/util.h
parentf317b4de30681026bc2284c6c2643b53afb8262b (diff)
downloadchrome-ec-d414c89a61f1e74b1d49161c3d136ef55c3289de.tar.gz
util: move console command argument parsing to util.c
move parse_offset_size() from flash.c to util.c for SPI flash driver usage BRANCH=none BUG=none TEST=make buildall Change-Id: Ib4824d2a7e2f5b8c3e4b918d6507c072ded8837d Signed-off-by: Dominic Chen <ddchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/202530 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index 8ba25c1780..89e07deb1e 100644
--- a/include/util.h
+++ b/include/util.h
@@ -158,4 +158,13 @@ int cond_went(cond_t *c, int boolean);
static inline int cond_went_false(cond_t *c) { return cond_went(c, 0); }
static inline int cond_went_true(cond_t *c) { return cond_went(c, 1); }
+/****************************************************************************/
+/* Console command parsing */
+
+/* Parse command-line arguments given integer shift value to obtain
+ * offset and size.
+ */
+int parse_offset_size(int argc, char **argv, int shift,
+ int *offset, int *size);
+
#endif /* __CROS_EC_UTIL_H */