5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches

Functions

wiced_result_t wiced_dct_read_lock (void **info_ptr, wiced_bool_t ptr_is_writable, dct_section_t section, uint32_t offset, uint32_t size)
 
wiced_result_t wiced_dct_read_unlock (void *info_ptr, wiced_bool_t ptr_is_writable)
 
wiced_result_t wiced_dct_write (const void *info_ptr, dct_section_t section, uint32_t offset, uint32_t size)
 
wiced_result_t wiced_dct_write_app_location (image_location_t *new_app_location_info, uint32_t dct_app_index)
 
wiced_result_t wiced_dct_write_boot_details (const boot_detail_t *new_boot_details)
 

Detailed Description

Device Configuration Table (Non-volatile flash storage space). The DCT is a structure which stores persistent application and system settings and allows for management of application settings.

Function Documentation

◆ wiced_dct_read_lock()

wiced_result_t wiced_dct_read_lock ( void ** info_ptr,
wiced_bool_t ptr_is_writable,
dct_section_t section,
uint32_t offset,
uint32_t size )
extern

Reads the DCT and returns a pointer to the DCT data

The operation of this function depends on whether the DCT is located in external or internal flash memory. If ptr_is_writable is set to false and the DCT is located in internal flash, then a direct pointer to the flash memory will be returned. Otherwise memory will be allocated and the DCT data will be copied into it.

Note
: this function MUST be used in pairs with wiced_dct_read_unlock to ensure that any allocated memory is freed.
: See DCT definitions in WICED/platform/include/platform_dct.h
: This function locks the DCT during the read. The DCT is not left in a locked state.
Parameters
info_ptr[out] : A pointer to the pointer that will be filled on return
ptr_is_writable[in] : If true then then the returned pointer will be in RAM allowing it to be modified. e.g. before being written
section[in] : The section of the DCT which should be read
offset[in] : The offset in bytes within the section
size[in] : The length of data that should be read
Returns
Wiced Result

◆ wiced_dct_read_unlock()

wiced_result_t wiced_dct_read_unlock ( void * info_ptr,
wiced_bool_t ptr_is_writable )
extern

Frees any space allocated in wiced_dct_read_lock()

Note
: this function must be used in pairs with wiced_dct_read_lock
: See DCT definitions in WICED/platform/include/platform_dct.h
Parameters
info_ptr[in] : A pointer that was created with wiced_dct_read_lock()
ptr_is_writable[in]: Indicates whether the pointer was retrevied as a writable pointer
Returns
Wiced Result

◆ wiced_dct_write()

wiced_result_t wiced_dct_write ( const void * info_ptr,
dct_section_t section,
uint32_t offset,
uint32_t size )

Writes data to the DCT

Writes a chunk of data to the DCT.

Note
: Ensure that this function is only called occasionally, otherwise the flash memory wear may result.
: See DCT definitions in WICED/platform/include/platform_dct.h
Parameters
info_ptr[in] : A pointer to the pointer that will be filled on return
section[in] : The section of the DCT which should be read
offset[in] : The offset in bytes within the section
size[in] : The length of data that should be written
Returns
Wiced Result

◆ wiced_dct_write_app_location()

wiced_result_t wiced_dct_write_app_location ( image_location_t * new_app_location_info,
uint32_t dct_app_index )

Write the app location to the DCT.

Parameters
new_app_location_info[in] : A pointer to the new image location structure to be written.
dct_app_index[in] : Application index to write.
Returns
Wiced Result

◆ wiced_dct_write_boot_details()

wiced_result_t wiced_dct_write_boot_details ( const boot_detail_t * new_boot_details)

Write the boot_details structure to the DCT.

Parameters
new_boot_details[in] : A pointer to the new boot_detail structure to be written.
Returns
Wiced Result