Advertisement
Guest User

Untitled

a guest
May 13th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. int fd = open( path, O_RDWR | O_CLOEXEC );
  2.  
  3. // for level-triggered interrupts:
  4. setup_irq();
  5. uio_irqenable( fd );
  6. when fd readable {
  7.     uio_wfi( fd );
  8.     handle_irq();
  9.     uio_irqenable( fd );
  10. }
  11.  
  12. // for edge-triggered interrupts:
  13. uio_irqenable( fd );
  14. setup_irq();
  15. when fd readable {
  16.     uio_wfi( fd );
  17.     uio_irqenable( fd );
  18.     handle_irq();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement