source: trunk/minix/lib/syslib/pci_attr_w16.c@ 11

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

Minix 3.1.2a

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