From a008b10d8488ef905a43de00ee5c8efd03b03ed6 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 9 Mar 2011 16:55:27 +0100 Subject: Support for FPGA registers --- pci.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pci.h') diff --git a/pci.h b/pci.h index 9625e72..2bb263f 100644 --- a/pci.h +++ b/pci.h @@ -9,6 +9,7 @@ #include "driver/pciDriver.h" #include "kernel.h" + #define pcilib_memcpy pcilib_memcpy32 #define pcilib_datacpy pcilib_datacpy32 @@ -41,6 +42,7 @@ typedef enum { typedef enum { + PCILIB_DEFAULT_PROTOCOL, IPECAMERA_REGISTER_PROTOCOL } pcilib_register_protocol_t; @@ -49,6 +51,9 @@ typedef enum { #define PCILIB_ADDRESS_INVALID ((uintptr_t)-1) #define PCILIB_REGISTER_BANK_INVALID ((pcilib_register_bank_t)-1) #define PCILIB_REGISTER_BANK0 0 +#define PCILIB_REGISTER_BANK1 1 +#define PCILIB_REGISTER_BANK2 2 +#define PCILIB_REGISTER_BANK3 3 typedef struct { pcilib_register_bank_addr_t addr; @@ -102,13 +107,17 @@ typedef struct { } pcilib_model_description_t; #ifdef _PCILIB_PCI_C +# include "ipecamera.h" +# include "default.h" + pcilib_model_description_t pcilib_model[3] = { { NULL, NULL, NULL }, { NULL, NULL, NULL }, { ipecamera_registers, ipecamera_register_banks, ipecamera_register_ranges } }; -pcilib_protocol_description_t pcilib_protocol[2] = { +pcilib_protocol_description_t pcilib_protocol[3] = { + { pcilib_default_read, pcilib_default_write }, { ipecamera_read, ipecamera_write }, { NULL, NULL } }; -- cgit v1.2.3