#include "stm32f10x.h"
#include "utils.h"

extern volatile uint16_t tick;

void delay_ms(uint16_t delay)
{
  uint32_t i;

  i = tick + delay;
  if (i >= 65536)
    i -= 65536;

  while (tick != i)
    ;
}
