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 )
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_result_t resource_get_readonly_buffer |
( |
const resource_hnd_t * |
resource, |
|
|
uint32_t |
offset, |
|
|
uint32_t |
maxsize, |
|
|
uint32_t * |
size_out, |
|
|
const void ** |
buffer |
|
) |
| |
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
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