The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/drivers/sb16/sb16.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.