...
Code Block | ||
---|---|---|
| ||
int response; const Int32 size = 64; byte[] data_block = new byte[size]; IntPtr data_block_ptr = Marshal.AllocHGlobal(Marshal.SizeOf(data_block[0]) * data_block.Length); addr = mcu.x.RAMStartAddr;//or use custom address //---------------------------------------------------- try { unsafe { response = FLASHPROARM_API.F_Read_Bytes_Block(addr, size, (byte*)data_block_ptr); } Marshal.Copy(data_block_ptr, data_block, 0, data_block.Length); } finally { Marshal.FreeHGlobal(data_block_ptr); } |
Basic code example below is compatible with C#:
...
, and can be found here: C/C++ Basic Demo Code Sequence
...