Skip to content

Commit

Permalink
serial: 不打印 ETIMEDOUT 异常
Browse files Browse the repository at this point in the history
* 上层处理掉了

Signed-off-by: xychen <xychen@listenai.com>
  • Loading branch information
xychen committed Mar 13, 2024
1 parent a42f5d9 commit b6ff05d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libcskburn_serial/src/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,17 @@ command(cskburn_serial_device_t *dev, uint8_t op, uint16_t in_len, uint32_t in_c

uint32_t req_len = sizeof(csk_command_t) + in_len;
if ((ret = command_send(dev, op, dev->req_buf, req_len, timeout)) < 0) {
LOGD_RET(ret, "DEBUG: Failed to write command %02X", op);
if (ret != -ETIMEDOUT) {
LOGD_RET(ret, "DEBUG: Failed to write command %02X", op);
}
goto exit;
}

uint8_t *res_ptr;
if ((ret = command_recv(dev, op, &res_ptr, timeout)) < 0) {
LOGD_RET(ret, "DEBUG: Failed to read command %02X", op);
if (ret != -ETIMEDOUT) {
LOGD_RET(ret, "DEBUG: Failed to read command %02X", op);
}
goto exit;
}

Expand Down

0 comments on commit b6ff05d

Please sign in to comment.