mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
stm32f0: Fix buffer size for i2c host command receive
Packets can be 128 bytes, and are preceded by a prefix byte. So we need a 129-byte buffer, not a 128-byte buffer. BUG=chrome-os-partner:30079 BRANCH=none TEST=do pd software sync; see that 128-byte packets transfer correctly Change-Id: Ic1e6cfec2c042537768d1cd0eecea509cc90c052 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/210502 Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
61d0caf338
commit
947f7ff936
@@ -121,8 +121,11 @@ static void i2c_init_port(const struct i2c_port_t *p)
|
||||
/*****************************************************************************/
|
||||
#ifdef HAS_TASK_HOSTCMD
|
||||
/* Host command slave */
|
||||
/* Buffer for host commands (including version, error code and checksum) */
|
||||
static uint8_t host_buffer[I2C_MAX_HOST_PACKET_SIZE];
|
||||
/*
|
||||
* Buffer for received host command packets (including prefix byte on request,
|
||||
* and result/size on response)
|
||||
*/
|
||||
static uint8_t host_buffer[I2C_MAX_HOST_PACKET_SIZE + 2];
|
||||
static uint8_t params_copy[I2C_MAX_HOST_PACKET_SIZE] __aligned(4);
|
||||
static int host_i2c_resp_port;
|
||||
static int tx_pending;
|
||||
|
||||
Reference in New Issue
Block a user