/* Copies data currently in flash to the block->data and sets the base address.  */
static blt_bool FlashInitBlock(tFlashBlockInfo *block, blt_addr address)
/* Copies data currently in flash to the block->data and sets the base address.  */
static blt_bool FlashInitBlock(tFlashBlockInfo *block, blt_addr address)
{
  blt_int8u oldPage;
  if ((address % FLASH_WRITE_BLOCK_SIZE) != 0)
  {
    return BLT_FALSE;
  }
  if (block->base_addr == address)
  {
    return BLT_TRUE;
  }
  block->base_addr = address;
  oldPage = FLASH_PPAGE_REG;
  FLASH_PPAGE_REG = FlashGetPhysPage(address);
  CpuMemCopy((blt_addr)block->data, (blt_addr)FlashGetPhysAddr(address), FLASH_WRITE_BLOCK_SIZE);
  FLASH_PPAGE_REG = oldPage;
  return BLT_TRUE;
}