diff options
Diffstat (limited to 'drivers/pci.h')
-rw-r--r-- | drivers/pci.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pci.h b/drivers/pci.h new file mode 100644 index 0000000..6a8bc1c --- /dev/null +++ b/drivers/pci.h @@ -0,0 +1,14 @@ +#include <stdint.h> + +struct PCI_DEVICE { + uint16_t vendor; + uint16_t device; + uint8_t bus; + uint8_t slot; +}; + +uint32_t pci_config_read32(const struct PCI_DEVICE *device, uint8_t func, + uint8_t offset); + +int pci_populate_device_struct(uint16_t vendor, uint16_t device, + struct PCI_DEVICE *pci_device); |