Files
OpenCellular/chip
Randall Spangler bb9b335e31 stm32: Don't use a stack buffer for i2c_read_string()
We read a counted string (byte 0 = count, bytes 1 - count = chars) and
convert it to a null-terminated string.  Since both have a 1-byte
overhead, we can use the destination buffer instead of using a
stack-based buffer.

BUG=chrome-os-partner:23928
BRANCH=none (pit is affected, but battery console command isn't used on
       end user systems)
TEST=battery command shows correct strings (SDI / 4302D40 / LiP), and doesn't
     stack overflow.

Change-Id: Ic0f111cde2d57b41d6ce9287e0c771acc09a8869
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/176116
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2013-11-07 23:42:43 +00:00
..
2013-11-02 01:07:10 +00:00