Merge pull request #4656 from LMESTM/update_flash_comments

Correct comments in flash api for STM32 L0 targets
pull/4636/head
Jimmy Brisson 2017-06-29 11:09:23 -05:00 committed by GitHub
commit 9b082fff55
1 changed files with 1 additions and 2 deletions

View File

@ -119,16 +119,15 @@ int32_t flash_program_page(flash_t *obj, uint32_t address,
}
uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address) {
/* considering 1 sector = 1 page */
if ((address >= (FLASH_BASE + FLASH_SIZE)) || (address < FLASH_BASE)) {
return MBED_FLASH_INVALID_SIZE;
} else {
/* sector composed of N pages */
return (NUM_PAGES_IN_SECTOR * FLASH_PAGE_SIZE);
}
}
uint32_t flash_get_page_size(const flash_t *obj) {
/* considering 1 sector = 1 page */
return FLASH_PAGE_SIZE;
}