EasyManua.ls Logo

Bridgetek FT801 - CMD_GETPTR - Get the End Memory Address of Inflated Data

Default Icon
263 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
223
Product Page
Document Feedback Copyright © Bridgetek Limited
+24
F
5.42 CMD_GETPTR - get the end memory address of inflated
data
C prototype
void cmd_getptr( uint32_t result
);
Parameters
result
The end address of decompressed data done by CMD_INFLATE.
The starting address of decompressed data as was specified by CMD_INFLATE,
while the end address of decompressed data can be retrieved by this command.
It is one out parameter and can be passed in as any value with CMD_GETPTR to
RAM_CMD.
Command layout
+0
CMD_GETPTR (0xffffff23)
+4
result
Examples
cmd_inflate(1000); //Decompress the data into RAM_G + 1000
...... //Following the zlib compressed data
While(rd16(REG_CMD_WRITE) != rd16(REG_CMD_READ)); //Wait till the
compression was done
uint16_t x = rd16(REG_CMD_WRITE);
uint32_t ending_address = 0;
cmd_getptr(0);
ending_address = rd32(RAM_CMD + x + 4);
Code snippet 13 CMD_GETPTR command example

Table of Contents