adi_jtag_dp_scan() function
Scan DPACC or APACC using target ordered uint8_t buffers. No endianness conversions are performed. See section 4.4.3 of the ADIv5/ADIv6 spec, which discusses operations which access these registers. Note that only one scan is performed. If rnw is set, a separate scan will be needed to collect the data which was read; the "invalue" collects the posted result of a preceding operation, not the current one.
Arguments
instr
JTAG_DP_APACC (AP access) or JTAG_DP_DPACC (DP access)
reg_addr
two significant bits; A[3:2]; for APACC access, the SELECT register has more addressing bits.
rnw
false iff outvalue will be written to the DP or AP
outvalue
points to a 32-bit (little-endian) integer
invalue
NULL, or points to a 32-bit (little-endian) integer
memaccess_tck
number of idle cycles to add after AP access
ack
points to where the three bit JTAG_ACK_* code will be stored