Azure IoT middleware for FreeRTOS
Functions
azure_iot_flash_platform.h File Reference

Defines the flash platform interface for devices enabling ADU. More...

#include <stdint.h>
#include "azure_iot_result.h"
#include "azure_iot_flash_platform_port.h"

Go to the source code of this file.

Functions

AzureIoTResult_t AzureIoTPlatform_Init (AzureADUImage_t *const pxAduImage)
 Initialize the flash platform. More...
 
int64_t AzureIoTPlatform_GetSingleFlashBootBankSize ()
 Get the size of a single boot bank. More...
 
AzureIoTResult_t AzureIoTPlatform_WriteBlock (AzureADUImage_t *const pxAduImage, uint32_t ulOffset, uint8_t *const pData, uint32_t ulBlockSize)
 Write a block of data to the image. More...
 
AzureIoTResult_t AzureIoTPlatform_VerifyImage (AzureADUImage_t *const pxAduImage, uint8_t *pucSHA256Hash, uint32_t ulSHA256HashLength)
 Verify the bytes written to the image match a SHA256 hash. More...
 
AzureIoTResult_t AzureIoTPlatform_EnableImage (AzureADUImage_t *const pxAduImage)
 Enable the update image. More...
 
AzureIoTResult_t AzureIoTPlatform_ResetDevice (AzureADUImage_t *const pxAduImage)
 Reset the device. More...
 

Detailed Description

Defines the flash platform interface for devices enabling ADU.

Function Documentation

◆ AzureIoTPlatform_EnableImage()

AzureIoTResult_t AzureIoTPlatform_EnableImage ( AzureADUImage_t *const  pxAduImage)

Enable the update image.

Parameters
pxAduImageThe #AzureADUImage_t to use for this operation.
Returns
AzureIoTResult_t

◆ AzureIoTPlatform_GetSingleFlashBootBankSize()

int64_t AzureIoTPlatform_GetSingleFlashBootBankSize ( )

Get the size of a single boot bank.

Returns
int64_t

◆ AzureIoTPlatform_Init()

AzureIoTResult_t AzureIoTPlatform_Init ( AzureADUImage_t *const  pxAduImage)

Initialize the flash platform.

Parameters
pxAduImageThe #AzureADUImage_t to use for this operation.
Returns
AzureIoTResult_t

◆ AzureIoTPlatform_ResetDevice()

AzureIoTResult_t AzureIoTPlatform_ResetDevice ( AzureADUImage_t *const  pxAduImage)

Reset the device.

Parameters
pxAduImageThe #AzureADUImage_t to use for this operation.
Returns
AzureIoTResult_t

◆ AzureIoTPlatform_VerifyImage()

AzureIoTResult_t AzureIoTPlatform_VerifyImage ( AzureADUImage_t *const  pxAduImage,
uint8_t *  pucSHA256Hash,
uint32_t  ulSHA256HashLength 
)

Verify the bytes written to the image match a SHA256 hash.

Parameters
pxAduImageThe #AzureADUImage_t to use for this operation.
pucSHA256HashThe pointer to the SHA256 hash.
ulSHA256HashLengthThe length of pucSHA256Hash.
Returns
AzureIoTResult_t

◆ AzureIoTPlatform_WriteBlock()

AzureIoTResult_t AzureIoTPlatform_WriteBlock ( AzureADUImage_t *const  pxAduImage,
uint32_t  ulOffset,
uint8_t *const  pData,
uint32_t  ulBlockSize 
)

Write a block of data to the image.

Parameters
pxAduImageThe #AzureADUImage_t to use for this operation.
ulOffsetThe offset into the image from which to start writing.
pDataThe pointer to the data to write.
ulBlockSizeThe length of pData.
Returns
AzureIoTResult_t