Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify on page alignment handling #452

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion source/include/ota_platform_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,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
Expand Down
Loading