Add in/out functions for 16 and 32-bit quantities.
diff --git a/protos.h b/protos.h
index 3e8d179..425cc9d 100644
--- a/protos.h
+++ b/protos.h
@@ -162,11 +162,31 @@
return *(volatile uint8_t *)(pci_io_base + port);
}
+static inline uint16_t inw(unsigned long port)
+{
+ return *(volatile uint16_t *)(pci_io_base + port);
+}
+
+static inline uint32_t inl(unsigned long port)
+{
+ return *(volatile uint32_t *)(pci_io_base + port);
+}
+
static inline void outb(uint8_t val, unsigned long port)
{
*(volatile uint8_t *)(pci_io_base + port) = val;
}
+static inline void outw(uint16_t val, unsigned long port)
+{
+ *(volatile uint16_t *)(pci_io_base + port) = val;
+}
+
+static inline void outl(uint32_t val, unsigned long port)
+{
+ *(volatile uint32_t *)(pci_io_base + port) = val;
+}
+
/*
* CRB functions
*/