mirror of https://github.com/wolfSSL/wolfBoot.git
F-9724: partial-flash-write uses bitwise NOT
The formula is data | ~current_data (bitwise); the comment used the logical '!'pull/892/head
parent
c58a6905f0
commit
ae2145a380
|
|
@ -223,7 +223,7 @@ int pic32_flash_write(uint32_t address, const uint8_t *data, int len)
|
|||
_addr = pic32_addr_dqword_align(address);
|
||||
/* Setup an aligned buffer with the following rules:
|
||||
* - For addresses outside the writing range: 0xFF (no change)
|
||||
* - For addresses inside the writing range: data | !current_data
|
||||
* - For addresses inside the writing range: data | ~current_data
|
||||
*
|
||||
* This approach ensures we only flip bits from 1 to 0 when writing
|
||||
* without an erase operation. When the address is aligned and length
|
||||
|
|
|
|||
Loading…
Reference in New Issue