示例#1
0
void delay_micro_seconds(uint32_t us){
    uint32_t sys_ticks;
    sys_ticks = SystemCoreClock;
    sys_ticks /= 1000000;
    sys_ticks *= us;
    delay_system_ticks(sys_ticks);
}
示例#2
0
/*
  Delay by the provided number of micro seconds.
  Limitation: "us" * System-Freq in MHz must now overflow in 32 bit.
  Values between 0 and 1.000.000 (1 second) are ok.
*/
void delay_micro_seconds(uint32_t us)
{
  uint32_t sys_ticks;

  sys_ticks = SYS_CORE_CLOCK / 1000000UL;
  sys_ticks *= us;
  delay_system_ticks(sys_ticks);  
}