Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
selissia committed Apr 13, 2022
1 parent 86310c3 commit bbf022d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/platform/EFR32/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context)
}

// Copy data into the word-aligned writeBuffer, once it fills write its contents to the bootloader storage
// Final data block is handled in HandleFinalize().
uint32_t blockReadOffset = 0;
while (blockReadOffset < block.size())
{
Expand Down
5 changes: 4 additions & 1 deletion src/platform/EFR32/OTAImageProcessorImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface
*/
CHIP_ERROR ReleaseBlock();

// EFR32 platform creates a single instance of OTAImageProcessorImpl class.
// If that changes then the use of static members and functions must be revisited
static uint32_t mWriteOffset; // End of last written block
static uint8_t mSlotId; // Bootloader storage slot
MutableByteSpan mBlock;
OTADownloader * mDownloader;
OTAImageHeaderParser mHeaderParser;
const char * mImageFile = nullptr;
static constexpr size_t kAlignmentBytes = 64;
// Intermediate, word-aligned buffer for writing to the bootloader storage
// Intermediate, word-aligned buffer for writing to the bootloader storage.
// Bootloader storage API requires the buffer size to be a multiple of 4.
static uint8_t writeBuffer[kAlignmentBytes] __attribute__((aligned(4)));
// Offset indicates how far the write buffer has been filled
static uint16_t writeBufOffset;
Expand Down

0 comments on commit bbf022d

Please sign in to comment.