5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
Wiced Resource Management API's

Functions

resource_result_t resource_free_readonly_buffer (const resource_hnd_t *handle, const void *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)
 
resource_result_t resource_read (const resource_hnd_t *resource, uint32_t offset, uint32_t maxsize, uint32_t *size, void *buffer)
 

Variables

const char * memory_resource_handle_t::data
 
void *   resource_hnd_t::external_storage_context 
 
const char * filesystem_resource_handle_t::filename
 
resource_location_t resource_hnd_t::location
 
memory_resource_handle_t   resource_hnd_t::mem 
 
unsigned long filesystem_resource_handle_t::offset
 
unsigned long resource_hnd_t::size
 

Detailed Description

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

Function Documentation

◆ resource_free_readonly_buffer()

resource_result_t resource_free_readonly_buffer ( const resource_hnd_t * handle,
const void * buffer )
extern

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()

resource_result_t resource_read ( const resource_hnd_t * resource,
uint32_t offset,
uint32_t maxsize,
uint32_t * size,
void * buffer )
extern

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

Variable Documentation

◆ data

const char* memory_resource_handle_t::data

resource data

◆ [] [1/2]

void* { ... } ::external_storage_context

< memory resource handle

◆ external_storage_context [2/2]

void* resource_hnd_t::external_storage_context

< memory resource handle

◆ filename

const char* filesystem_resource_handle_t::filename

name of the resource

◆ location

resource_location_t resource_hnd_t::location

resource location

◆ [] [1/2]

memory_resource_handle_t { ... } ::mem

< filesystem resource handle

◆ mem [2/2]

memory_resource_handle_t resource_hnd_t::mem

< 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

resource size