FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
168
Copyright © Bridgetek Limited
5.23
CMD_MEMSET - fill memory with a byte value
C prototype
void cmd_memset( uint32_t ptr,
uint32_t value,
uint32_t num );
Parameters
ptr
Starting address of the memory block
value
Value to be written to memory
num
Number of bytes in the memory block
The completion of this function is detected when the value of REG_CMD_READ is
equal to REG_CMD_WRITE.
Command layout
+0
CMD_MEMSET(0xffffff1b)
+4
ptr
+8
Value
+12
num
Examples
To write 0xff the first 1K of main memory:
cmd_memset(0, 0xff, 1024);