summaryrefslogtreecommitdiff
path: root/src/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pci.h')
-rw-r--r--src/pci.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pci.h b/src/pci.h
new file mode 100644
index 0000000..2381fc3
--- /dev/null
+++ b/src/pci.h
@@ -0,0 +1,16 @@
+#ifndef PCI_H
+#define PCI_H
+
+#include "port.h"
+
+typedef struct {
+ port32_t command_port;
+ port32_t data_port;
+} pci_controller_t;
+
+void pci_controller_init( pci_controller_t *controller );
+
+uint16_t pci_controller_read( pci_controller_t *controller, uint16_t bus, uint16_t device, uint16_t function, uint32_t offset );
+void pci_controller_write( pci_controller_t *controller, uint16_t bus, uint16_t device, uint16_t function, uint32_t offset, uint32_t data );
+
+#endif // PCI_H