hosted/dap: Cleaned up some of the link reset pointer maths

This commit is contained in:
dragonmux 2022-07-13 12:50:16 -04:00 committed by Piotr Esden-Tempski
parent 8e8ad7dbd4
commit 52cad38fac
1 changed files with 2 additions and 2 deletions

View File

@ -489,7 +489,7 @@ void dap_reset_link(bool jtag)
*p++ = 0x3c;
*p++ = 0xe7;
*p++ = 0x1f;
buf[1] = ((p - &buf[2]) * 8) - 2;
buf[1] = ((p - buf + 2) * 8) - 2;
} else {
*p++ = 0x9e;
*p++ = 0xe7;
@ -501,7 +501,7 @@ void dap_reset_link(bool jtag)
*p++ = 0xff;
*p++ = 0xff;
*p++ = 0x00;
buf[1] = (p - &buf[2]) * 8;
buf[1] = (p - buf + 2) * 8;
}
dbg_dap_cmd(buf, sizeof(buf), p - buf);