source: trunk/minix/drivers/sb16/sb16.c@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.0 KB
Line 
1#include "sb16.h"
2
3/*===========================================================================*
4 * mixer_set
5 *===========================================================================*/
6PUBLIC int mixer_set(reg, data)
7int reg;
8int 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 *===========================================================================*/
23PUBLIC int sb16_inb(port)
24int port;
25{
26 int s;
27 unsigned long value;
28
29 if ((s=sys_inb(port, &value)) != OK)
30 panic("SB16DSP","sys_inb() failed", s);
31
32 return value;
33}
34
35
36/*===========================================================================*
37 * sb16_outb
38 *===========================================================================*/
39PUBLIC void sb16_outb(port, value)
40int port;
41int value;
42{
43 int s;
44
45 if ((s=sys_outb(port, value)) != OK)
46 panic("SB16DSP","sys_outb() failed", s);
47}
Note: See TracBrowser for help on using the repository browser.