Azure IoT middleware for FreeRTOS
azure_iot_flash_platform.h
Go to the documentation of this file.
1 /* Copyright (c) Microsoft Corporation.
2  * Licensed under the MIT License. */
3 
9 #ifndef AZURE_IOT_FLASH_PLATFORM_H
10 #define AZURE_IOT_FLASH_PLATFORM_H
11 
12 #include <stdint.h>
13 
14 #include "azure_iot_result.h"
15 
16 #include "azure_iot_flash_platform_port.h"
17 
24 AzureIoTResult_t AzureIoTPlatform_Init( AzureADUImage_t * const pxAduImage );
25 
32 
42 AzureIoTResult_t AzureIoTPlatform_WriteBlock( AzureADUImage_t * const pxAduImage,
43  uint32_t ulOffset,
44  uint8_t * const pData,
45  uint32_t ulBlockSize );
46 
55 AzureIoTResult_t AzureIoTPlatform_VerifyImage( AzureADUImage_t * const pxAduImage,
56  uint8_t * pucSHA256Hash,
57  uint32_t ulSHA256HashLength );
58 
65 AzureIoTResult_t AzureIoTPlatform_EnableImage( AzureADUImage_t * const pxAduImage );
66 
73 AzureIoTResult_t AzureIoTPlatform_ResetDevice( AzureADUImage_t * const pxAduImage );
74 
75 #endif /* AZURE_IOT_FLASH_PLATFORM_H */
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.
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.
AzureIoTResult_t AzureIoTPlatform_EnableImage(AzureADUImage_t *const pxAduImage)
Enable the update image.
AzureIoTResult_t AzureIoTPlatform_ResetDevice(AzureADUImage_t *const pxAduImage)
Reset the device.
AzureIoTResult_t AzureIoTPlatform_Init(AzureADUImage_t *const pxAduImage)
Initialize the flash platform.
int64_t AzureIoTPlatform_GetSingleFlashBootBankSize()
Get the size of a single boot bank.
Azure IoT FreeRTOS middleware result values.
enum AzureIoTResult AzureIoTResult_t
The results used by the middleware.