BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / kernel / drivers / network / sis900 / driver.h
blob5ce05be4f37b1cafefffcfa95d323d22ff4067b6
1 /*
2 * Copyright (c) 2001-2007 pinc Software. All Rights Reserved.
3 * Distributed under the terms of the MIT license.
4 */
5 #ifndef DRIVER_H
6 #define DRIVER_H
9 #include <PCI.h>
12 // PCI Communications
14 #define IO_PORT_PCI_ACCESS true
15 //#define MEMORY_MAPPED_PCI_ACCESS true
17 #if IO_PORT_PCI_ACCESS
18 # define write8(address,value) (*pci->write_io_8)((address),(value))
19 # define write16(address,value) (*pci->write_io_16)((address),(value))
20 # define write32(address,value) (*pci->write_io_32)((address),(value))
21 # define read8(address) ((*pci->read_io_8)(address))
22 # define read16(address) ((*pci->read_io_16)(address))
23 # define read32(address) ((*pci->read_io_32)(address))
24 #else /* MEMORY_MAPPED_PCI_ACCESS */
25 # define read8(address) (*((volatile uint8*)(address)))
26 # define read16(address) (*((volatile uint16*)(address)))
27 # define read32(address) (*((volatile uint32*)(address)))
28 # define write8(address,data) (*((volatile uint8 *)(address)) = data)
29 # define write16(address,data) (*((volatile uint16 *)(address)) = (data))
30 # define write32(address,data) (*((volatile uint32 *)(address)) = (data))
31 #endif
33 extern char *gDeviceNames[];
34 extern pci_info *pciInfo[];
35 extern pci_module_info *pci;
37 #endif /* DRIVER_H */