diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-06-27 14:42:39 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-01 16:14:15 -0700 |
commit | 2730daa5679bc0d2a048a60055a7dc89d060076e (patch) | |
tree | 8b8326fb10cf694ab551d955bd8c1bcb8ecff1cc /util/comm-i2c.c | |
parent | 267dbb74d28e4d5d13e892488563ab439398513d (diff) | |
download | chrome-ec-2730daa5679bc0d2a048a60055a7dc89d060076e.tar.gz |
Comm interface now provides max I/O sizes and preallocated buffers
The maximum packet / param size differs depending on interface and
protocol version. Commands can now ask the comm interface what the
limits are, and can use preallocated buffers to avoid needless
malloc/free.
BUG=chrome-os-partner:20571
BRANCH=none
TEST=the following all work on link
burn_my_ec
ectool version
ectool chargedump
ectool console
ectool i2cxfer 5 0x41 2
Change-Id: Ib847994da3f79721e7fb4e347231b9147a3f485f
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/60275
Diffstat (limited to 'util/comm-i2c.c')
-rw-r--r-- | util/comm-i2c.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/comm-i2c.c b/util/comm-i2c.c index 8f75320b48..eab48d2a99 100644 --- a/util/comm-i2c.c +++ b/util/comm-i2c.c @@ -213,5 +213,7 @@ int comm_init_i2c(void) free(file_path); ec_command = ec_command_i2c; + ec_max_outsize = ec_max_insize = EC_HOST_PARAM_SIZE; + return 0; } |