mem_ap_write() function
Synchronous write of a block of memory, using a specific access size.
Arguments
buffer
The data buffer to write. 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 writes to do (in size units, not bytes).
address
Address to be written; it must be writable by the currently selected MEM-AP.
addrinc
Whether the target address should be increased for each write or not. This should normally be true, except when writing to e.g. a FIFO.
Return value
ERROR_OK on success, otherwise an error code.