WCIED Resource Management API's has functions to get the resource size and reads resource data from a resource location and returns the number of bytes in an caller filled buffer
The Resource could be one of the three locations
- Wiced Filesystem ( File System)
- Internal Memory (Embedded Flash memory)
- External Storage ( External Flash connected via SPI interface )
◆ resource_free_readonly_buffer()
Free a read only resource buffer using the handle specified
- Parameters
-
| [in] | resource | : handle of the resource to read |
| [in] | buffer | : pointer to a buffer set using resource_get_readonly_buffer |
- Returns
- resource_result_t
◆ resource_get_readonly_buffer()
| resource_result_t resource_get_readonly_buffer |
( |
const resource_hnd_t * | resource, |
|
|
uint32_t | offset, |
|
|
uint32_t | maxsize, |
|
|
uint32_t * | size_out, |
|
|
const void ** | buffer ) |
|
extern |
Retrieve a read only resource buffer using the handle specified
- Parameters
-
| [in] | resource | : handle of the resource to read |
| [in] | offset | : offset from the beginning of the resource block |
| [in] | maxsize | : size of the buffer |
| [out] | size | : size of the data successfully read |
| [out] | buffer | : pointer to a buffer pointer to point to the resource data |
- Returns
- resource_result_t
◆ resource_read()
Read resource using the handle specified
- Parameters
-
| [in] | resource | : handle of the resource to read |
| [in] | offset | : offset from the beginning of the resource block |
| [in] | maxsize | : size of the buffer |
| [out] | size | : size of the data successfully read |
| [in] | buffer | : pointer to a buffer to contain the read data |
- Returns
- resource_result_t
◆ data
| const char* memory_resource_handle_t::data |
◆ [] [1/2]
| void* { ... } ::external_storage_context |
◆ external_storage_context [2/2]
| void* resource_hnd_t::external_storage_context |
◆ filename
| const char* filesystem_resource_handle_t::filename |
◆ location
◆ [] [1/2]
| memory_resource_handle_t { ... } ::mem |
< filesystem resource handle
◆ mem [2/2]
< filesystem resource handle
◆ offset
| unsigned long filesystem_resource_handle_t::offset |
Offset to the start of the resource
◆ size
| unsigned long resource_hnd_t::size |