VarEntry & FlashPage structures creation/deletion

tifiles_ve_create

TIEXPORT2 VarEntry* TICALL tifiles_ve_create(void)

Allocate a new VarEntry structure.

Return value :
the entry or NULL if error.

tifiles_ve_alloc_data

TIEXPORT2 void *tifiles_ve_alloc_data(size_t size)

Allocate space for data field of VarEntry.

size :
length of data.
Return value :
allocated space or NULL if error.

tifiles_ve_create_with_data

TIEXPORT2 VarEntry* TICALL tifiles_ve_create_with_data(uint32_t size)

Allocate a new VarEntry structure and space for data.

size :
length of data.
Return value :
the entry or NULL if error.

tifiles_ve_create_array

TIEXPORT2 VarEntry** TICALL tifiles_ve_create_array(int nelts)

Allocate a NULL-terminated array of VarEntry structures. You have to allocate each elements of the array by yourself.

nelts :
size of NULL-terminated array (number of VarEntry structures).
Return value :
the array or NULL if error.

tifiles_ve_resize_array

TIEXPORT2 VarEntry** TICALL tifiles_ve_resize_array(VarEntry** array, int nelts)

Re-allocate a NULL-terminated array of VarEntry structures. You have to allocate each elements of the array by yourself.

array :
address of array
nelts :
size of NULL-terminated array (number of VarEntry structures).
Return value :
the array or NULL if error.

tifiles_ve_delete

TIEXPORT2 void TICALL tifiles_ve_delete(VarEntry* ve)

Free data buffer and the structure itself.

ve :
var entry.
Return value :
none.

tifiles_ve_delete_array

TIEXPORT2 void TICALL tifiles_ve_delete_array(VarEntry** array)

Free the whole array (data buffer, VarEntry structure and array itself).

array :
an NULL-terminated array of VarEntry structures.
Return value :
none.

tifiles_ve_copy

TIEXPORT2 VarEntry* TICALL tifiles_ve_copy(VarEntry* dst, VarEntry* src)

Copy VarEntry and its content from src to dst. If data is NULL, a new buffer is allocated before copying.

dst :
destination entry.
src :
source entry.
Return value :
the dst pointer or NULL if malloc error.

tifiles_ve_dup

TIEXPORT2 VarEntry* TICALL tifiles_ve_dup(VarEntry* src)

Duplicate VarEntry and its content from src to dst (full copy).

src :
source entry.
Return value :
a newly allocated entry (must be freed with #tifiles_ve_delete when no longer needed).

tifiles_fp_create

TIEXPORT2 FlashPage* TICALL tifiles_fp_create(void)

Allocate a new FlashPage structure.

Return value :
the entry or NULL if error.

tifiles_fp_alloc_data

TIEXPORT2 void *tifiles_fp_alloc_data(size_t size)

Allocate space for data field of FlashPage.

size :
length of data.
Return value :
allocated space or NULL if error.

tifiles_fp_create_with_data

TIEXPORT2 FlashPage* TICALL tifiles_fp_create_with_data(uint32_t size)

Allocate a new FlashPage structure and space for data.

size :
length of data.
Return value :
the entry or NULL if error.

tifiles_fp_create_array

TIEXPORT2 FlashPage** TICALL tifiles_fp_create_array(int nelts)

Allocate a NULL-terminated array of FlashPage structures. You have to allocate each elements of the array by yourself.

nelts :
size of NULL-terminated array (number of FlashPage structures).
Return value :
the array or NULL if error.

tifiles_fp_delete

TIEXPORT2 void TICALL tifiles_fp_delete(FlashPage* fp)

Free data buffer and the structure itself.

ve :
var entry.
Return value :
none.

tifiles_fp_delete_array

TIEXPORT2 void TICALL tifiles_fp_delete_array(FlashPage** array)

Free the whole array (data buffer, FlashPage structure and array itself).

array :
an NULL-terminated array of FlashPage structures.
Return value :
none.

Return to the main index