/* Determines the flash page that the address belongs to. 
end of FlashGetBank  */
static blt_int32u FlashGetPage(blt_addr address)
/* Determines the flash page that the address belongs to. 
end of FlashGetBank  */
static blt_int32u FlashGetPage(blt_addr address)
{
  blt_int32u result = 0;
  ASSERT_RT(address >= FLASH_BASE);
  ASSERT_RT((address - FLASH_BASE) < FLASH_SIZE);
  if (FlashGetBank(address) == FLASH_BANK_1)
  {
    result = (address - FLASH_BASE) / FLASH_PAGE_SIZE;
  }
  else
  {
    result = (address - (FLASH_BASE + FLASH_BANK_SIZE)) / FLASH_PAGE_SIZE;
  }
  return result;
}