pci_vendors.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Copyright (C) 2021 Rain */
  2. /* This file is part of XNIX. */
  3. /*
  4. XNIX is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) and later version.
  8. */
  9. /*
  10. XNIX is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. */
  15. /*
  16. You should have received a copy of the GNU General Public License
  17. along with XNIX. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. #ifdef _PCIVEND_H
  20. #error "pci_vendor.h includes for the second time. "
  21. #endif
  22. #define _PCIVEND_H
  23. #include <kernel/types.h>
  24. #include <kernel/errno.h>
  25. #include <kernel/pci.h>
  26. /* (only built-in devices) */
  27. /* register your own device's dev_init to here */
  28. #define foo(fn) extern errno_t fn (struct pci_header0 *)
  29. foo(ide_init);
  30. struct pci_vendor_table pci_vendors[] = {
  31. {CLASS_DISK, 0x01, ide_init},
  32. {0xff, 0xff, NULL}
  33. };