stm32/flash: Use FLASH_TYPEPROGRAM_WORD to support newer HALs.

This commit is contained in:
Damien George 2018-02-23 16:30:47 +11:00
parent e6220618ce
commit ea05b400df
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ void flash_write(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32)
// program the flash word by word
for (int i = 0; i < num_word32; i++) {
if (HAL_FLASH_Program(TYPEPROGRAM_WORD, flash_dest, *src) != HAL_OK) {
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, flash_dest, *src) != HAL_OK) {
// error occurred during flash write
HAL_FLASH_Lock(); // lock the flash
return;