Go to the source code of this file.
|
uint8_t * | readHeatshrinkFileInplace (cnfsFileIdx_t fIdx, uint32_t *outsize, uint8_t *decompressedBuf, heatshrink_decoder *hsd) |
| Read a heatshrink compressed file from the filesystem into an output array. Files that are in the assets_image folder before compilation and flashing will automatically be included in the firmware.
|
|
uint8_t * | readHeatshrinkFile (cnfsFileIdx_t fIdx, uint32_t *outsize, bool readToSpiRam) |
| Read a heatshrink compressed file from the filesystem into an output array. Files that are in the assets_image folder before compilation and flashing will automatically be included in the firmware.
|
|
uint8_t * | readHeatshrinkNvs (const char *namespace, const char *key, uint32_t *outsize, bool spiRam) |
|
uint32_t | heatshrinkCompress (uint8_t *dest, const uint8_t *src, uint32_t size) |
|
bool | writeHeatshrinkNvs (const char *namespace, const char *key, const uint8_t *data, uint32_t size) |
|
bool | heatshrinkDecompress (uint8_t *dest, uint32_t *destSize, const uint8_t *source, uint32_t sourceSize) |
| Get the size of and decompress heatshrink data.
|
|
◆ readHeatshrinkFileInplace()
uint8_t * readHeatshrinkFileInplace |
( |
cnfsFileIdx_t | fIdx, |
|
|
uint32_t * | outsize, |
|
|
uint8_t * | decompressedBuf, |
|
|
heatshrink_decoder * | hsd ) |
Read a heatshrink compressed file from the filesystem into an output array. Files that are in the assets_image folder before compilation and flashing will automatically be included in the firmware.
You must provide a decoder and decode space for this function
- Parameters
-
fIdx | The CNFS index of the file to load |
outsize | A pointer to a size_t to return how much data was read |
decompressedBuf | Memory to store decoded data. This must be as large as the decoded data |
hsd | A heatshrink decoder |
- Returns
- A pointer to the read data if successful, or NULL if there is a failure This data must be freed when done
◆ readHeatshrinkFile()
uint8_t * readHeatshrinkFile |
( |
cnfsFileIdx_t | fIdx, |
|
|
uint32_t * | outsize, |
|
|
bool | readToSpiRam ) |
Read a heatshrink compressed file from the filesystem into an output array. Files that are in the assets_image folder before compilation and flashing will automatically be included in the firmware.
- Parameters
-
fIdx | The CNFS index of the file to load |
outsize | A pointer to a size_t to return how much data was read |
readToSpiRam | true to use SPI RAM, false to use normal RAM |
- Returns
- A pointer to the read data if successful, or NULL if there is a failure This data must be freed when done
◆ readHeatshrinkNvs()
uint8_t * readHeatshrinkNvs |
( |
const char * | namespace, |
|
|
const char * | key, |
|
|
uint32_t * | outsize, |
|
|
bool | spiRam ) |
◆ heatshrinkCompress()
uint32_t heatshrinkCompress |
( |
uint8_t * | dest, |
|
|
const uint8_t * | src, |
|
|
uint32_t | size ) |
◆ writeHeatshrinkNvs()
bool writeHeatshrinkNvs |
( |
const char * | namespace, |
|
|
const char * | key, |
|
|
const uint8_t * | data, |
|
|
uint32_t | size ) |
◆ heatshrinkDecompress()
bool heatshrinkDecompress |
( |
uint8_t * | dest, |
|
|
uint32_t * | destSize, |
|
|
const uint8_t * | source, |
|
|
uint32_t | sourceSize ) |
Get the size of and decompress heatshrink data.
- Parameters
-
dest | |
destSize | |
source | |
sourceSize | |
- Returns
- true
-
false