![]() |
DVBCore
22.3.0
Open Source DVB Engine
|
Header file - Function prototypes for NVM and Heap. More...
Go to the source code of this file.
Macros | |
| #define | ELOAD_RESERVED_NVM_OFFSET 0 |
| #define | ELOAD_RESERVED_NVM_SIZE_WIDTH 2 |
| #define | ELOAD_NVM_DATA_OFFSET ELOAD_RESERVED_NVM_SIZE_WIDTH |
Functions | |
| void | STB_MEMInitialiseRAM (void) |
| Initialises the heap. | |
| void | STB_MEMInitialiseNVM (void) |
| Initialises Non-Volatile memory access. For a new NVM device, this function formats it ready for use, otherwise it prepares existing data for access. | |
| BOOLEAN | STB_MEMReadNVM (U32BIT addr, U32BIT bytes, U8BIT *dst_addr) |
| Read data from the NVM. More... | |
| BOOLEAN | STB_MEMWriteNVM (U32BIT addr, U32BIT bytes, U8BIT *src_addr) |
| Writes data to the NVM. More... | |
| void * | STB_MEMReadSecureVariable (U8BIT key, U32BIT *len) |
| Read variable defined by the given key from secure NVM. The data must be released using STB_MEMReleaseSecureVariable. This function is used for CI+. More... | |
| void | STB_MEMReleaseSecureVariable (void *value) |
| Releas the data returned by STB_MEMReadSecureVariable. This function is used for CI+. More... | |
| BOOLEAN | STB_MEMWriteSecureVariable (U8BIT key, void *value, U32BIT len) |
| Writes data defined by the given key to secure NVM. This function is used for CI+. More... | |
| const void * | STB_MEMReadSecureConstant (U8BIT key, U32BIT *len) |
| Read constant defined by the given key from secure NVM. The data must not be released (it is managed by the platform layer). This function is used for CI+. More... | |
| U32BIT | STB_MEMGetNVMSize (void) |
| Returns the size (capacity) of the NVM. More... | |
| U32BIT | STB_MEMGetNVMOffset (void) |
| Returns any offset required in NVM to avoid private data. More... | |
| U8BIT | STB_MEMGetNVMAlign (void) |
| Returns the word alignment size of the NVM device. More... | |
| void * | STB_MEMGetSysRAM (U32BIT bytes) |
| Allocates a new block of memory for system use. More... | |
| void * | STB_MEMResizeSysRAM (void *ptr, U32BIT new_num_bytes) |
| Changes the size of the given block of memory ensuring data contained within the original memory block is maintained. More... | |
| void | STB_MEMFreeSysRAM (void *block) |
| Releases a previously allocated block of system memory. More... | |
| U8BIT | STB_MEMSysRAMUsed (void) |
| Returns the amount of available system memory consumed. More... | |
| void * | STB_MEMGetAppRAM (U32BIT bytes) |
| Allocates a new block of memory for application use. More... | |
| void * | STB_MEMResizeAppRAM (void *ptr, U32BIT new_num_bytes) |
| Changes the size of the given block of memory ensuring data contained within the original memory block is maintained. More... | |
| void | STB_MEMFreeAppRAM (void *block) |
| Releases a previously allocated block of system memory. More... | |
| U8BIT | STB_MEMAppRAMUsed (void) |
| Returns the amount of available application memory consumed. More... | |
| BOOLEAN | STB_MEMConfigMloaderForUpgrade (void *loader_data, U32BIT data_size) |
| BOOLEAN | STB_MEMReadMloaderData (void *buffer, U32BIT size) |
| BOOLEAN | STB_MEMWriteMloaderData (void *buffer, U32BIT size) |
| BOOLEAN | STB_NVMFileSize (U8BIT *filename, U32BIT *filesize) |
| Returns the size in KB of the given file. More... | |
| void * | STB_NVMOpenFile (U8BIT *name, E_STB_DSK_FILE_MODE mode) |
| Opens an existing file or creates a new one. More... | |
| void | STB_NVMCloseFile (void *file) |
| Flushes and closes an open file. More... | |
| U32BIT | STB_NVMReadFile (void *file, U8BIT *data, U32BIT size) |
| Reads data from an open file. More... | |
| U32BIT | STB_NVMWriteFile (void *file, U8BIT *data, U32BIT size) |
| Writes data to an open file. More... | |
| BOOLEAN | STB_NVMDeleteFile (U8BIT *filename) |
| Deletes the file. More... | |
| BOOLEAN | STB_NVMMoveFile (U8BIT *oldname, U8BIT *newname) |
| Move file or directory (and it's children). More... | |
| void * | STB_NVMOpenDirectory (U8BIT *dir_name) |
| Opens a directory in order to read the entries. More... | |
| BOOLEAN | STB_NVMReadDirectory (void *dir, U8BIT *filename, U16BIT filename_len, E_STB_DIR_ENTRY_TYPE *entry_type) |
| Reads the next entry from the directory, returning the name of the entry and the type of the entry. More... | |
| void | STB_NVMCloseDirectory (void *dir) |
| Closes the directory for reading. More... | |
Header file - Function prototypes for NVM and Heap.
| U8BIT STB_MEMAppRAMUsed | ( | void | ) |
Returns the amount of available application memory consumed.
| void STB_MEMFreeAppRAM | ( | void * | block | ) |
Releases a previously allocated block of system memory.
| block_ptr | address of block to be released |
| void STB_MEMFreeSysRAM | ( | void * | block | ) |
Releases a previously allocated block of system memory.
| block_ptr | address of block to be released |
| void* STB_MEMGetAppRAM | ( | U32BIT | bytes | ) |
Allocates a new block of memory for application use.
| bytes | Size of required block in bytes |
| U8BIT STB_MEMGetNVMAlign | ( | void | ) |
Returns the word alignment size of the NVM device.
| U32BIT STB_MEMGetNVMOffset | ( | void | ) |
Returns any offset required in NVM to avoid private data.
| U32BIT STB_MEMGetNVMSize | ( | void | ) |
Returns the size (capacity) of the NVM.
| void* STB_MEMGetSysRAM | ( | U32BIT | bytes | ) |
Allocates a new block of memory for system use.
| bytes | Size of required block in bytes |
| BOOLEAN STB_MEMReadNVM | ( | U32BIT | addr, |
| U32BIT | bytes, | ||
| U8BIT * | dst_addr | ||
| ) |
Read data from the NVM.
| addr | The NVM start address |
| bytes | The number of bytes to read |
| dst_addr | Caller's buffer for the data |
| const void* STB_MEMReadSecureConstant | ( | U8BIT | key, |
| U32BIT * | len | ||
| ) |
Read constant defined by the given key from secure NVM. The data must not be released (it is managed by the platform layer). This function is used for CI+.
| key | data item to be read |
| len | returned length of data read |
| void* STB_MEMReadSecureVariable | ( | U8BIT | key, |
| U32BIT * | len | ||
| ) |
Read variable defined by the given key from secure NVM. The data must be released using STB_MEMReleaseSecureVariable. This function is used for CI+.
| key | data item to be read |
| len | returned length of data read |
| void STB_MEMReleaseSecureVariable | ( | void * | value | ) |
Releas the data returned by STB_MEMReadSecureVariable. This function is used for CI+.
| value | pointer to data to be released |
| void* STB_MEMResizeAppRAM | ( | void * | ptr, |
| U32BIT | new_num_bytes | ||
| ) |
Changes the size of the given block of memory ensuring data contained within the original memory block is maintained.
| ptr | pointer to memory already allocated from the app heap |
| new_num_bytes | size of the memory block to be returned |
| void* STB_MEMResizeSysRAM | ( | void * | ptr, |
| U32BIT | new_num_bytes | ||
| ) |
Changes the size of the given block of memory ensuring data contained within the original memory block is maintained.
| ptr | pointer to memory already allocated from the system heap |
| new_num_bytes | size of the memory block to be returned |
| U8BIT STB_MEMSysRAMUsed | ( | void | ) |
Returns the amount of available system memory consumed.
| BOOLEAN STB_MEMWriteNVM | ( | U32BIT | addr, |
| U32BIT | bytes, | ||
| U8BIT * | src_addr | ||
| ) |
Writes data to the NVM.
| addr | The NVM start address to write to |
| bytes | The number of bytes to be written |
| src_addr | Pointer to the data to be written |
| BOOLEAN STB_MEMWriteSecureVariable | ( | U8BIT | key, |
| void * | value, | ||
| U32BIT | len | ||
| ) |
Writes data defined by the given key to secure NVM. This function is used for CI+.
| key | data item to be written |
| value | pointer to data to be written |
| len | data size |
| void STB_NVMCloseDirectory | ( | void * | dir | ) |
Closes the directory for reading.
| dir | directory handle |
| void STB_NVMCloseFile | ( | void * | file | ) |
Flushes and closes an open file.
| file | The file handle |
| BOOLEAN STB_NVMDeleteFile | ( | U8BIT * | filename | ) |
Deletes the file.
| filename | Path name of the file to be deleted |
| BOOLEAN STB_NVMFileSize | ( | U8BIT * | filename, |
| U32BIT * | filesize | ||
| ) |
Returns the size in KB of the given file.
| filename | Name of the file in the nvm |
| filesize | Returned value giving the file size in KB |
| BOOLEAN STB_NVMMoveFile | ( | U8BIT * | oldname, |
| U8BIT * | newname | ||
| ) |
Move file or directory (and it's children).
| oldname | Path name of the file to be moved |
| newname | Path name of new file location |
| void* STB_NVMOpenDirectory | ( | U8BIT * | dir_name | ) |
Opens a directory in order to read the entries.
| dir_name | Name of the directory to open |
| void* STB_NVMOpenFile | ( | U8BIT * | name, |
| E_STB_DSK_FILE_MODE | mode | ||
| ) |
Opens an existing file or creates a new one.
| name | - The filename (including path). When the mode is FILE_MODE_OVERWRITE, the directories in the path will be created when they don't exist. |
| mode | The access mode |
| BOOLEAN STB_NVMReadDirectory | ( | void * | dir, |
| U8BIT * | filename, | ||
| U16BIT | filename_len, | ||
| E_STB_DIR_ENTRY_TYPE * | entry_type | ||
| ) |
Reads the next entry from the directory, returning the name of the entry and the type of the entry.
| dir | Handle returned when the directory was opened |
| filename | Array in which the name is returned |
| filename_len | Size of the filename array |
| entry_type | Type of entry |
| U32BIT STB_NVMReadFile | ( | void * | file, |
| U8BIT * | data, | ||
| U32BIT | size | ||
| ) |
Reads data from an open file.
| file | The file handle |
| data | The caller's buffer |
| size | Number of bytes to be read |
| U32BIT STB_NVMWriteFile | ( | void * | file, |
| U8BIT * | data, | ||
| U32BIT | size | ||
| ) |
Writes data to an open file.
| file | The file handle |
| data | Pointer to the data to be written |
| size | Number of bytes to write |
1.8.11