From cf5b34919dbd460720079f05e209a96141dd386b Mon Sep 17 00:00:00 2001 From: lienng_aws <66034203+LienNguyen2910@users.noreply.github.com> Date: Tue, 30 Aug 2022 18:44:02 -0700 Subject: [PATCH] Clarify on page alignment handling --- source/include/ota_platform_interface.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/include/ota_platform_interface.h b/source/include/ota_platform_interface.h index cf63c3bca..6a9ba14af 100644 --- a/source/include/ota_platform_interface.h +++ b/source/include/ota_platform_interface.h @@ -188,7 +188,10 @@ typedef OtaPalStatus_t (* OtaPalCreateFileForRx_t)( OtaFileContext_t * const pFi typedef OtaPalStatus_t ( * OtaPalCloseFile_t )( OtaFileContext_t * const pFileContext ); /** - * @brief Write a block of data to the specified file at the given offset. + * @brief Write a block of data to the specified file at the given offset. + + * All data blocks passed from OTA agent have the same size which must be configured in the parameter otaconfigLOG2_FILE_BLOCK_SIZE in ota_config.h. Except the last block which may be less than this configured block size. + * The parameter must be configured in such a way that the block size is multiples of page size to ensure proper page alignment, and the OtaPalWriteBlock_t does not need to handle page alignment explicitly. * * @note This function must always write a complete file block before returning. So the number of * bytes written will be equal to the size of the file block. Exception only in case of last block