Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 14th, 2010  |  syntax: None  |  size: 0.21 KB  |  views: 171  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. static inline void delay_loop(void)
  2. {
  3.     asm volatile(
  4.         "0:\n"
  5.         "  add %0, %0, #1\n"
  6.         "  cmp %1, %0\n"
  7.         "  bne 0b"
  8.         : : "r"(0), "r"(FREQ >> 22));
  9. }
  10. #define DELAY delay_loop()
clone this paste RAW Paste Data