OTA_SERVICE_FH_CtrlBlkRead

C

bool OTA_SERVICE_FH_CtrlBlkRead(OTA_CONTROL_BLOCK *controlBlock, uint32_t length)

Summary

Reads control block (Meta-data) from the internal dual bank flash or external memory.

Description

This function reads control block (Meta-data) from the internal dual bank flash or external memory.

Precondition

None.

Parameters

ParamDescription
controlBlockPointer to the control block buffer
lengthLength of the control block buffer

Returns

Returns -

true - If control block is read successfully

false - If control block read is failed

Example

uint8_t CACHE_ALIGN controlBlockBuffer[OTA_CONTROL_BLOCK_BUFFER_SIZE]; 
uint32_t ctrlBlkSize = OTA_CONTROL_BLOCK_BUFFER_SIZE;
OTA_CONTROL_BLOCK *controlBlock = (OTA_CONTROL_BLOCK *)controlBlockBuffer;

if (OTA_SERVICE_FH_CtrlBlkRead(controlBlock, ctrlBlkSize) == false)
{
    // Error
}
else
{
    // Success
}

Remarks

None.