mem_ap_read() function
Synchronous read of a block of memory, using a specific access size.
Arguments
buffer
The data buffer to receive the data. No particular alignment is assumed.
size
Which access size to use, in bytes. 1, 2, or 4. If large data extension is available also accepts sizes 8, 16, 32.
count
The number of reads to do (in size units, not bytes).
adr
Address to be read; it must be readable by the currently selected MEM-AP.
addrinc
Whether the target address should be increased after each read or not. This should normally be true, except when reading from e.g. a FIFO.
Return value
ERROR_OK on success, otherwise an error code.