Skip to content
Snippets Groups Projects
Commit c0caeeb2 authored by Dor Laor's avatar Dor Laor
Browse files

Add PCI header file with in/out functions

parent c4f4c689
No related branches found
No related tags found
No related merge requests found
#ifndef ARCH_X86_PCI_H
#define ARCH_X86_PCI_H
#include <stdint.h>
#include "arch/x64/processor.hh"
namespace pci {
typedef unsigned long ulong;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
inline u8 inb(u16 port) {
return processor::x86::inb(port);
}
inline u16 inw(u16 port) {
return processor::x86::inw(port);
}
inline u32 inl(u16 port) {
return processor::x86::inl(port);
}
inline void outb(u8 val, u16 port) {
processor::x86::outb(val, port);
}
inline void outw(u16 val, u16 port) {
processor::x86::outw(val, port);
}
inline void outl(u32 val, u16 port) {
processor::x86::outl(val, port);
}
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment