stm32l4: flash: fix page erase for second bank

l4 is pages, not sectors, so update apis to be consistent. (other
families use page/sector as defined in the reference manual)
Make sure that pages on the second bank can also be erased.  Use the
same style in use for f2/4/7 for sector numbers across banks.
This commit is contained in:
Karl Palsson
2018-07-23 09:07:45 +00:00
parent 850931dbcd
commit b9448bff16
2 changed files with 9 additions and 13 deletions

View File

@@ -231,8 +231,8 @@ void flash_clear_status_flags(void);
void flash_lock_option_bytes(void);
void flash_program_word(uint32_t address, uint32_t data);
void flash_program(uint32_t address, uint8_t *data, uint32_t len);
void flash_erase_sector(uint8_t sector);
void flash_erase_all_sectors(void);
void flash_erase_page(uint32_t page);
void flash_erase_all_pages(void);
void flash_program_option_bytes(uint32_t data);
END_DECLS