/* Finalizes the flash driver operations. There could still be data in the currently active block that needs to be flashed.  */
blt_bool FlashDone(void)
/* Finalizes the flash driver operations. There could still be data in the currently active block that needs to be flashed.  */
blt_bool FlashDone(void)
{
  blt_bool result = BLT_TRUE;
  if (bootBlockInfo.base_addr != FLASH_INVALID_ADDRESS)
  {
    if (FlashWriteBlock(&bootBlockInfo) == BLT_FALSE)
    {
      result = BLT_FALSE;
    }
  }
  if (result == BLT_TRUE)
  {
    if (blockInfo.base_addr != FLASH_INVALID_ADDRESS)
    {
      if (FlashWriteBlock(&blockInfo) == BLT_FALSE)
      {
        result = BLT_FALSE;
      }
    }
  }
  return result;
}