/* Update number of Flash wait states in line with new frequency and current voltage range.  */
ErrorStatus UTILS_SetFlashLatency(uint32_t HCLK_Frequency)
/* Update number of Flash wait states in line with new frequency and current voltage range.  */
ErrorStatus UTILS_SetFlashLatency(uint32_t HCLK_Frequency)
{
  ErrorStatus status = SUCCESS;
  uint32_t latency = LL_FLASH_LATENCY_0;
  if (HCLK_Frequency == 0U)
  {
    status = ERROR;
  }
  else
  {
    if (HCLK_Frequency > UTILS_SCALE1_LATENCY1_FREQ)
    {
      latency = LL_FLASH_LATENCY_1;
    }
    else
    {
    }
    LL_FLASH_SetLatency(latency);
    if (LL_FLASH_GetLatency() != latency)
    {
      status = ERROR;
    }
  }
  return status;
}