1 #include "sb16.h"
2
3 /*===========================================================================*
4 * mixer_set
5 *===========================================================================*/
6 PUBLIC int mixer_set(reg, data)
7 int reg;
8 int data;
9 {
10 int i;
11
12 sb16_outb(MIXER_REG, reg);
13 for(i = 0; i < 100; i++);
14 sb16_outb(MIXER_DATA, data);
15
16 return OK;
17 }
18
19
20 /*===========================================================================*
21 * sb16_inb
22 *===========================================================================*/
23 PUBLIC int sb16_inb(port)
24 int port;
25 {
26 int s, value = -1;
27
28 if ((s=sys_inb(port, &value)) != OK)
29 panic("SB16DSP","sys_inb() failed", s);
30
31 return value;
32 }
33
34
35 /*===========================================================================*
36 * sb16_outb
37 *===========================================================================*/
38 PUBLIC void sb16_outb(port, value)
39 int port;
40 int value;
41 {
42 int s;
43
44 if ((s=sys_outb(port, value)) != OK)
45 panic("SB16DSP","sys_outb() failed", s);
Cache object: 77a4b6c8b1aef8ae4e59a04ed92ed945
|