BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / kernel / bus_managers / pci / pci_controller.h
blob3a37e80ccdbafd3437a3adc936f5351e85ea0a50
1 /*
2 * Copyright 2006, Marcus Overhagen. All rights reserved.
4 * Distributed under the terms of the MIT License.
5 */
6 #ifndef __PCI_CONTROLLER_H
7 #define __PCI_CONTROLLER_H
9 #include <SupportDefs.h>
11 typedef struct pci_controller
13 // read PCI config space
14 status_t (*read_pci_config)(void *cookie,
15 uint8 bus, uint8 device, uint8 function,
16 uint16 offset, uint8 size, uint32 *value);
18 // write PCI config space
19 status_t (*write_pci_config)(void *cookie,
20 uint8 bus, uint8 device, uint8 function,
21 uint16 offset, uint8 size, uint32 value);
23 status_t (*get_max_bus_devices)(void *cookie, int32 *count);
25 status_t (*read_pci_irq)(void *cookie,
26 uint8 bus, uint8 device, uint8 function,
27 uint8 pin, uint8 *irq);
29 status_t (*write_pci_irq)(void *cookie,
30 uint8 bus, uint8 device, uint8 function,
31 uint8 pin, uint8 irq);
33 } pci_controller;
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
40 status_t pci_controller_init(void);
41 status_t pci_controller_add(pci_controller *controller, void *cookie);
43 #ifdef __cplusplus
45 #endif
47 #endif