Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
Functions | |
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 | heatshrinkDecompress (uint8_t *dest, uint32_t *destSize, const uint8_t *source, uint32_t sourceSize) |
Get the size of and decompress heatshrink data. | |
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
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 |
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.
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 |
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 heatshrinkDecompress | ( | uint8_t * | dest, |
uint32_t * | destSize, | ||
const uint8_t * | source, | ||
uint32_t | sourceSize ) |
Get the size of and decompress heatshrink data.
dest | |
destSize | |
source | |
sourceSize |