Skip to content

Commit

Permalink
Fix pointer increment
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinux committed May 13, 2024
1 parent 0d3cd66 commit be46f6e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hal/stm32h7.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,11 +571,9 @@ int hal_flash_otp_write(uint32_t flashAddress, const void* data, uint16_t length
/* Program an OTP word (16 bits) */
*(volatile uint16_t*)flashAddress = *(const uint16_t*)data;

#if 0
/* Read it back */
tmp = *(volatile uint16_t*)flashAddress;
(void)tmp; /* avoid unused warnings */
#endif

/* Wait for last operation to be completed */
flash_otp_wait();
Expand All @@ -584,7 +582,7 @@ int hal_flash_otp_write(uint32_t flashAddress, const void* data, uint16_t length
FLASH_OPTCR &= ~FLASH_OPTCR_PG_OTP;

flashAddress += sizeof(uint16_t);
data++;
(uintptr_t)data++;
idx += sizeof(uint16_t);
}

Expand Down

0 comments on commit be46f6e

Please sign in to comment.