]> sigrok.org Git - libsigrok.git/commitdiff
asix-sigma: Fix a register addressing bug (non-issue)
authorGerhard Sittig <redacted>
Thu, 25 May 2017 19:57:30 +0000 (21:57 +0200)
committerUwe Hermann <redacted>
Fri, 26 May 2017 20:48:21 +0000 (22:48 +0200)
Fix how the READ_ID register index was passed to the hardware access.
Addresses are sent in nibbles, so shift by eight is wrong here. No harm
was done, as the register's index is zero.

src/hardware/asix-sigma/protocol.c

index 253e98a0aa5349c58a3babff447f3af1b20776db..05709c1d1c8d5bb369dc76185bd81c7668d478bf 100644 (file)
@@ -330,7 +330,7 @@ static int sigma_fpga_init_la(struct dev_context *devc)
        /* Initialize the logic analyzer mode. */
        uint8_t logic_mode_start[] = {
                REG_ADDR_LOW  | (READ_ID & 0xf),
-               REG_ADDR_HIGH | (READ_ID >> 8),
+               REG_ADDR_HIGH | (READ_ID >> 4),
                REG_READ_ADDR,  /* Read ID register. */
 
                REG_ADDR_LOW | (WRITE_TEST & 0xf),