From: Gerhard Sittig Date: Mon, 31 Jan 2022 22:25:15 +0000 (+0100) Subject: kingst-la2016: weaken run state check in hardware initialization X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4494721714407631b2410f21b493134d265bf695;p=libsigrok.git kingst-la2016: weaken run state check in hardware initialization Weaken the check for plausible run states in the early read and test immediately after the initial hardware configuration. The strict pattern used to not match when an earlier session successfully triggered (digits 0x9 vs 0xd in the register's LSB positions). The test was never fatal, it's just for information. --- diff --git a/src/hardware/kingst-la2016/protocol.c b/src/hardware/kingst-la2016/protocol.c index de5e1ac7..21265ab0 100644 --- a/src/hardware/kingst-la2016/protocol.c +++ b/src/hardware/kingst-la2016/protocol.c @@ -1404,8 +1404,8 @@ SR_PRIV int la2016_init_hardware(const struct sr_dev_inst *sdi) } state = run_state(sdi); - if (state != 0x85e9) { - sr_warn("Unexpected run state, want 0x85e9, got 0x%04x.", state); + if ((state & 0xfff0) != 0x85e0) { + sr_warn("Unexpected run state, want 0x85eX, got 0x%04x.", state); } ret = ctrl_out(sdi, CMD_BULK_RESET, 0x00, 0, NULL, 0);