Example #1
0
void DWT_Delay(uint32_t hz){
	int32_t tp = DWT_Get() + hz;
	while (DWT_Compare(tp));
}
Example #2
0
void DWT_Delay(uint32_t us) // microseconds
{
  int32_t tp = DWT_Get() + us * (SystemCoreClock1/1000000);
  while (DWT_Compare(tp));
}