AbstractBeliefs

Untitled

Dec 17th, 2011
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // the following loop takes half of a microsecond (4 cycles)
  2.     // per iteration, so execute it twice for each microsecond of
  3.     // delay requested.
  4.     us <<= 1;
  5.  
  6.     // busy wait
  7.     __asm__ __volatile__ (
  8.         "1: sbiw %0,1" "\n\t" // 2 cycles
  9.         "brne 1b" : "=w" (us) : "0" (us) // 2 cycles
  10.     );
Advertisement
Add Comment
Please, Sign In to add comment