Change flash_erase_sector (f2/f4) to take numerical sector argument. As opposed to using one of the defines in the header, this is more convenient when programatically deciding which sectors to erase.