FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
160
Copyright © Bridgetek Limited
5.17
CMD_REGREAD - read a register value
C prototype
void cmd_regread( uint32_t ptr,
uint32_t result );
Parameters
ptr
Address of register to read
result
The register value to be read at ptr address.
Command layout
+0
CMD_REGREAD(0xffffff19)
+4
Ptr
+8
Result
Examples
To capture the exact time when a command completes:
uint16_t x = rd16(REG_CMD_WRITE);
cmd_regread(REG_CLOCK, 0);
...
printf("%08x\n", rd32(R x + 8));