source: trunk/minix/lib/syslib/pci_attr_r16.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: 629 bytes
Line 
1/*
2pci_attr_r16.c
3*/
4
5#include "pci.h"
6#include "syslib.h"
7#include <minix/sysutil.h>
8
9/*===========================================================================*
10 * pci_attr_r16 *
11 *===========================================================================*/
12PUBLIC u16_t pci_attr_r16(devind, port)
13int devind;
14int port;
15{
16 int r;
17 message m;
18
19 m.m_type= BUSC_PCI_ATTR_R16;
20 m.m2_i1= devind;
21 m.m2_i2= port;
22
23 r= sendrec(pci_procnr, &m);
24 if (r != 0)
25 panic("pci", "pci_attr_r16: can't talk to PCI", r);
26
27 if (m.m_type != 0)
28 panic("pci", "pci_attr_r16: got bad reply from PCI", m.m_type);
29
30 return m.m2_l1;
31}
32
Note: See TracBrowser for help on using the repository browser.