Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <minix/syslib.h>
- #include <minix/drivers.h>
- int speaker_ctrl(unsigned char on) {
- if (on == 0)
- {
- if (sys_outb(0x61, 0x0)!=0)
- return 1;
- }
- else {
- if (sys_outb(0x61, 0x3)!=0)
- return 1;
- }
- return 0;
- }
- int speaker_test(unsigned long freq, unsigned long time) {
- int i;
- speaker_ctrl(o);
- if (timer_set_square(2,freq)!=0)
- return 1;
- timer_test_int(time*60);
- speaker_ctrl(0);
- return 0;
- }
Add Comment
Please, Sign In to add comment