/* Causes a blocking delay for 'delayTicks' ticks on the systick timer. For example: systickDelay(100) would cause a blocking delay for 100 ticks of the systick timer.  */
void systickDelay(uint32_t delayTicks)
/* Causes a blocking delay for 'delayTicks' ticks on the systick timer. For example: systickDelay(100) would cause a blocking delay for 100 ticks of the systick timer.  */
void systickDelay(uint32_t delayTicks)
{
  uint32_t curTicks;
  curTicks = systickTicks;
  if (delayTicks == 0) delayTicks = 1;
  if (curTicks > 0xFFFFFFFF - delayTicks)
  {
    while (systickTicks >= curTicks)
    {
      while (systickTicks < (delayTicks - (0xFFFFFFFF - curTicks)));
    }      
  }
  else
  {
    while ((systickTicks - curTicks) < delayTicks);
  }
}