F-9724: partial-flash-write uses bitwise NOT

The formula is data | ~current_data (bitwise); the comment used the
logical '!'
pull/892/head
Daniele Lacamera 2026-09-16 12:14:13 +02:00
parent c58a6905f0
commit ae2145a380
1 changed files with 1 additions and 1 deletions

View File

@ -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