Simulated product dispenser

Dependencies:   HTS221

Fork of mbed-cloud-workshop-connect-HTS221 by Jim Carver

Embed: (wiki syntax)

« Back to documentation index

_ARM_UC_PAAL_UPDATE Struct Reference

_ARM_UC_PAAL_UPDATE Struct Reference

Structure definition holding API function pointers. More...

#include <arm_uc_paal_update_api.h>

Data Fields

arm_uc_error_t(* Initialize )(ARM_UC_PAAL_UPDATE_SignalEvent_t callback)
 Initialize the underlying storage and set the callback handler.
ARM_UC_PAAL_UPDATE_CAPABILITIES(* GetCapabilities )(void)
 Get a bitmap indicating supported features.
uint32_t(* GetMaxID )(void)
 Get maximum number of supported storage locations.
arm_uc_error_t(* Prepare )(uint32_t location, const arm_uc_firmware_details_t *details, arm_uc_buffer_t *buffer)
 Prepare the storage layer for a new firmware image.
arm_uc_error_t(* Write )(uint32_t location, uint32_t offset, const arm_uc_buffer_t *buffer)
 Write a fragment to the indicated storage location.
arm_uc_error_t(* Finalize )(uint32_t location)
 Close storage location for writing and flush pending data.
arm_uc_error_t(* Read )(uint32_t location, uint32_t offset, arm_uc_buffer_t *buffer)
 Read a fragment from the indicated storage location.
arm_uc_error_t(* Activate )(uint32_t location)
 Set the firmware image in the slot to be the new active image.
arm_uc_error_t(* GetActiveFirmwareDetails )(arm_uc_firmware_details_t *details)
 Get firmware details for the actively running firmware.
arm_uc_error_t(* GetFirmwareDetails )(uint32_t location, arm_uc_firmware_details_t *details)
 Get firmware details for the firmware image in the slot passed.
arm_uc_error_t(* GetInstallerDetails )(arm_uc_installer_details_t *details)
 Get details for the component responsible for installation.

Detailed Description

Structure definition holding API function pointers.

Definition at line 82 of file arm_uc_paal_update_api.h.


Field Documentation

arm_uc_error_t(* Activate)(uint32_t location)

Set the firmware image in the slot to be the new active image.

This call is responsible for initiating the process for applying a new/different image. Depending on the platform this could be: * An empty call, if the installer can deduce which slot to choose from based on the firmware details. * Setting a flag to indicate which slot to use next. * Decompressing/decrypting/installing the firmware image on top of another.

Parameters:
locationStorage location ID.
Returns:
Returns ERR_NONE on accept, and signals the event handler with either DONE or ERROR when complete. Returns ERR_INVALID_PARAMETER on reject, and no signal is sent.

Definition at line 189 of file arm_uc_paal_update_api.h.

arm_uc_error_t(* Finalize)(uint32_t location)

Close storage location for writing and flush pending data.

Parameters:
locationStorage location ID.
Returns:
Returns ERR_NONE on accept, and signals the event handler with either DONE or ERROR when complete. Returns ERR_INVALID_PARAMETER on reject, and no signal is sent.

Definition at line 152 of file arm_uc_paal_update_api.h.

Get firmware details for the actively running firmware.

This call populates the passed details struct with information about the currently active firmware image. Only the fields marked as supported in the capabilities bitmap will have valid values.

Parameters:
detailsPointer to firmware details struct to be populated.
Returns:
Returns ERR_NONE on accept, and signals the event handler with either DONE or ERROR when complete. Returns ERR_INVALID_PARAMETER on reject, and no signal is sent.

Definition at line 203 of file arm_uc_paal_update_api.h.

Get a bitmap indicating supported features.

The bitmap is used in conjunction with the firmware and installer details struct to indicate what fields are supported and which values are valid.

Returns:
Capability bitmap.

Definition at line 102 of file arm_uc_paal_update_api.h.

arm_uc_error_t(* GetFirmwareDetails)(uint32_t location, arm_uc_firmware_details_t *details)

Get firmware details for the firmware image in the slot passed.

This call populates the passed details struct with information about the firmware image in the slot passed. Only the fields marked as supported in the capabilities bitmap will have valid values.

Parameters:
detailsPointer to firmware details struct to be populated.
Returns:
Returns ERR_NONE on accept, and signals the event handler with either DONE or ERROR when complete. Returns ERR_INVALID_PARAMETER on reject, and no signal is sent.

Definition at line 217 of file arm_uc_paal_update_api.h.

arm_uc_error_t(* GetInstallerDetails)(arm_uc_installer_details_t *details)

Get details for the component responsible for installation.

This call populates the passed details struct with information about the local installer. Only the fields marked as supported in the capabilities bitmap will have valid values. The installer could be the bootloader, a recovery image, or some other component responsible for applying the new firmware image.

Parameters:
detailsPointer to installer details struct to be populated.
Returns:
Returns ERR_NONE on accept, and signals the event handler with either DONE or ERROR when complete. Returns ERR_INVALID_PARAMETER on reject, and no signal is sent.

Definition at line 234 of file arm_uc_paal_update_api.h.

uint32_t(* GetMaxID)(void)

Get maximum number of supported storage locations.

Returns:
Number of storage locations.

Definition at line 109 of file arm_uc_paal_update_api.h.

arm_uc_error_t(* Initialize)(ARM_UC_PAAL_UPDATE_SignalEvent_t callback)

Initialize the underlying storage and set the callback handler.

Parameters:
callbackFunction pointer to event handler.
Returns:
Returns ERR_NONE on accept, and signals the event handler with either DONE or ERROR when complete. Returns ERR_INVALID_PARAMETER on reject, and no signal is sent.

Definition at line 92 of file arm_uc_paal_update_api.h.

arm_uc_error_t(* Prepare)(uint32_t location, const arm_uc_firmware_details_t *details, arm_uc_buffer_t *buffer)

Prepare the storage layer for a new firmware image.

The storage location is set up to receive an image with the details passed in the details struct.

Parameters:
locationStorage location ID.
detailsPointer to a struct with firmware details.
bufferTemporary buffer for formatting and storing metadata.
Returns:
Returns ERR_NONE on accept, and signals the event handler with either DONE or ERROR when complete. Returns ERR_INVALID_PARAMETER on reject, and no signal is sent.

Definition at line 123 of file arm_uc_paal_update_api.h.

arm_uc_error_t(* Read)(uint32_t location, uint32_t offset, arm_uc_buffer_t *buffer)

Read a fragment from the indicated storage location.

The function will read until the buffer is full or the end of the storage location has been reached. The actual amount of bytes read is set in the buffer struct.

Parameters:
locationStorage location ID.
offsetOffset in bytes to read from.
bufferPointer to buffer struct to store fragment. buffer->size contains the intended read size.
Returns:
Returns ERR_NONE on accept, and signals the event handler with either DONE or ERROR when complete. Returns ERR_INVALID_PARAMETER on reject, and no signal is sent. buffer->size contains actual bytes read on return.

Definition at line 169 of file arm_uc_paal_update_api.h.

arm_uc_error_t(* Write)(uint32_t location, uint32_t offset, const arm_uc_buffer_t *buffer)

Write a fragment to the indicated storage location.

The storage location must have been allocated using the Prepare call. The call is expected to write the entire fragment before signaling completion.

Parameters:
locationStorage location ID.
offsetOffset in bytes to where the fragment should be written.
bufferPointer to buffer struct with fragment.
Returns:
Returns ERR_NONE on accept, and signals the event handler with either DONE or ERROR when complete. Returns ERR_INVALID_PARAMETER on reject, and no signal is sent.

Definition at line 140 of file arm_uc_paal_update_api.h.