Guest User

Untitled

a guest
Dec 15th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <minix/syslib.h>
  2. #include <minix/drivers.h>
  3.  
  4. int speaker_ctrl(unsigned char on) {
  5. if (on == 0)
  6. {
  7. if (sys_outb(0x61, 0x0)!=0)
  8. return 1;
  9. }
  10. else {
  11. if (sys_outb(0x61, 0x3)!=0)
  12. return 1;
  13. }
  14. return 0;
  15. }
  16.  
  17. int speaker_test(unsigned long freq, unsigned long time) {
  18. int i;
  19. speaker_ctrl(o);
  20. if (timer_set_square(2,freq)!=0)
  21. return 1;
  22. timer_test_int(time*60);
  23. speaker_ctrl(0);
  24. return 0;
  25. }
Add Comment
Please, Sign In to add comment