Pineconium / ChoacuryOS

A WIP custom built OS
GNU General Public License v3.0
24 stars 6 forks source link

Peripheral Component Interconnect #4

Closed AptRock327 closed 7 months ago

AptRock327 commented 7 months ago

I said that I'll contribute to your project as it looks very nice, and I settled on giving you some PCI code. This code allows you to communicate with the PCI (Peripheral Component Interconnect). Don't worry, the PCIe is backwards-compatible with the PCI, so it will work on newer machines too (the proper way to deal with PCIe is to get the base address for the buffer from the ACPI, ugh). This can be pretty powerful when interacting with peripherals and extension cards. As an example, I also attached a simple piece of code that can detect a USB (Universal Serial Bus) device. The commit count only reaches 99, so I haven't ruined your 100th commit, haha.