/* This function provides accurate delay (in milliseconds) based on SysTick counter flag.  */
void HAL_Delay(__IO uint32_t Delay)
/* This function provides accurate delay (in milliseconds) based on SysTick counter flag.  */
void HAL_Delay(__IO uint32_t Delay)
{
  while(Delay)
  {
    if (SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk)
    {
      Delay--;
    }
  }
}